This repository was archived by the owner on Dec 20, 2025. It is now read-only.
fix(web): fix the mismatches in the return types of APIs in gate and orca#1883
Merged
mergify[bot] merged 5 commits intospinnaker:masterfrom Mar 1, 2025
Merged
Conversation
…es of gate and orca when delete pipeline execution api is invoked
dbyron-sf
reviewed
Mar 1, 2025
|
|
||
| @Autowired ObjectMapper objectMapper; | ||
|
|
||
| /** |
Contributor
There was a problem hiding this comment.
Do we need this in these tests?
Contributor
Author
There was a problem hiding this comment.
Do you mean autowiring of ObjectMapper? It's not. I will update. But if you are asking whether ObjectMapper is needed at all, there is a usage in the test to create the response body string.
Contributor
There was a problem hiding this comment.
I was asking about the FilterRegistrationBean
Contributor
There was a problem hiding this comment.
And it turns out that it is needed to silence warnings about e.g. missing X-SPINNAKER-USER, X-SPINNAKER-ACCOUNTS warnings...
Contributor
There was a problem hiding this comment.
I pushed some commits to silence those warnings, and some others.
989ce8c to
b529d7f
Compare
…orca for delete, resume, cancel and pause operations of a pipeline.
…iceTest to remove errors from test output
since it's not needed
…ders to requests in PipelineServiceTest to silence warnings like: 2025-03-01 11:28:27.487 WARN 98848 --- [ Test worker] c.n.s.okhttp.OkHttp3MetricsInterceptor : [] Request GET:http://localhost:52447/pipelines/my-pipeline-execution-id is missing [X-SPINNAKER-USER, X-SPINNAKER-ACCOUNTS] authentication headers and will be treated as anonymous. Request from: com.netflix.spinnaker.okhttp.MetricsInterceptor.doIntercept(MetricsInterceptor.java:82) at com.netflix.spinnaker.okhttp.OkHttp3MetricsInterceptor.intercept(OkHttp3MetricsInterceptor.java:36) at com.netflix.spinnaker.okhttp.SpinnakerRequestHeaderInterceptor.intercept(SpinnakerRequestHeaderInterceptor.java:64) at com.netflix.spinnaker.kork.retrofit.ErrorHandlingExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ErrorHandlingExecutorCallAdapterFactory.java:150) at com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall.executeCall(Retrofit2SyncCall.java:47) at com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall.execute(Retrofit2SyncCall.java:34) at com.netflix.spinnaker.gate.services.PipelineService.getPipeline(PipelineService.groovy:170) at com.netflix.spinnaker.gate.services.PipelineService$_setApplicationForExecution_closure2.doCall(PipelineService.groovy:222) at com.netflix.spinnaker.kork.core.RetrySupport.retry(RetrySupport.java:34) at com.netflix.spinnaker.kork.core.RetrySupport.retry(RetrySupport.java:27) at com.netflix.spinnaker.gate.services.PipelineService.setApplicationForExecution(PipelineService.groovy:222) at com.netflix.spinnaker.gate.services.PipelineService.deletePipeline(PipelineService.groovy:189) at com.netflix.spinnaker.gate.controllers.PipelineController.deletePipeline(PipelineController.groovy:279) at com.netflix.spinnaker.gate.service.PipelineServiceTest.invokeDeletePipelineExecution(PipelineServiceTest.java:135)
b529d7f to
073d67a
Compare
dbyron-sf
approved these changes
Mar 1, 2025
Contributor
|
@Mergifyio backport release-1.37.x |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Mar 1, 2025
…orca (#1883) * test(web): add a test to demonstrate the mismatch in api response types of gate and orca when delete pipeline execution api is invoked * fix(web): fix the mismatches in the return types of apis in gate and orca for delete, resume, cancel and pause operations of a pipeline. * refactor(web/test): mock DefaultProviderLookupService in PipelineServiceTest to remove errors from test output * refactor(web/test): remove request id header from PipelineServiceTest since it's not needed * refactor(web/test): add X-SPINNAKER-USER and X-SPINNAKER-ACCOUNTS headers to requests in PipelineServiceTest to silence warnings like: 2025-03-01 11:28:27.487 WARN 98848 --- [ Test worker] c.n.s.okhttp.OkHttp3MetricsInterceptor : [] Request GET:http://localhost:52447/pipelines/my-pipeline-execution-id is missing [X-SPINNAKER-USER, X-SPINNAKER-ACCOUNTS] authentication headers and will be treated as anonymous. Request from: com.netflix.spinnaker.okhttp.MetricsInterceptor.doIntercept(MetricsInterceptor.java:82) at com.netflix.spinnaker.okhttp.OkHttp3MetricsInterceptor.intercept(OkHttp3MetricsInterceptor.java:36) at com.netflix.spinnaker.okhttp.SpinnakerRequestHeaderInterceptor.intercept(SpinnakerRequestHeaderInterceptor.java:64) at com.netflix.spinnaker.kork.retrofit.ErrorHandlingExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ErrorHandlingExecutorCallAdapterFactory.java:150) at com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall.executeCall(Retrofit2SyncCall.java:47) at com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall.execute(Retrofit2SyncCall.java:34) at com.netflix.spinnaker.gate.services.PipelineService.getPipeline(PipelineService.groovy:170) at com.netflix.spinnaker.gate.services.PipelineService$_setApplicationForExecution_closure2.doCall(PipelineService.groovy:222) at com.netflix.spinnaker.kork.core.RetrySupport.retry(RetrySupport.java:34) at com.netflix.spinnaker.kork.core.RetrySupport.retry(RetrySupport.java:27) at com.netflix.spinnaker.gate.services.PipelineService.setApplicationForExecution(PipelineService.groovy:222) at com.netflix.spinnaker.gate.services.PipelineService.deletePipeline(PipelineService.groovy:189) at com.netflix.spinnaker.gate.controllers.PipelineController.deletePipeline(PipelineController.groovy:279) at com.netflix.spinnaker.gate.service.PipelineServiceTest.invokeDeletePipelineExecution(PipelineServiceTest.java:135) --------- Co-authored-by: David Byron <[email protected]> (cherry picked from commit 15465c9)
mergify bot
added a commit
that referenced
this pull request
Mar 1, 2025
…orca (#1883) (#1884) * test(web): add a test to demonstrate the mismatch in api response types of gate and orca when delete pipeline execution api is invoked * fix(web): fix the mismatches in the return types of apis in gate and orca for delete, resume, cancel and pause operations of a pipeline. * refactor(web/test): mock DefaultProviderLookupService in PipelineServiceTest to remove errors from test output * refactor(web/test): remove request id header from PipelineServiceTest since it's not needed * refactor(web/test): add X-SPINNAKER-USER and X-SPINNAKER-ACCOUNTS headers to requests in PipelineServiceTest to silence warnings like: 2025-03-01 11:28:27.487 WARN 98848 --- [ Test worker] c.n.s.okhttp.OkHttp3MetricsInterceptor : [] Request GET:http://localhost:52447/pipelines/my-pipeline-execution-id is missing [X-SPINNAKER-USER, X-SPINNAKER-ACCOUNTS] authentication headers and will be treated as anonymous. Request from: com.netflix.spinnaker.okhttp.MetricsInterceptor.doIntercept(MetricsInterceptor.java:82) at com.netflix.spinnaker.okhttp.OkHttp3MetricsInterceptor.intercept(OkHttp3MetricsInterceptor.java:36) at com.netflix.spinnaker.okhttp.SpinnakerRequestHeaderInterceptor.intercept(SpinnakerRequestHeaderInterceptor.java:64) at com.netflix.spinnaker.kork.retrofit.ErrorHandlingExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ErrorHandlingExecutorCallAdapterFactory.java:150) at com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall.executeCall(Retrofit2SyncCall.java:47) at com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall.execute(Retrofit2SyncCall.java:34) at com.netflix.spinnaker.gate.services.PipelineService.getPipeline(PipelineService.groovy:170) at com.netflix.spinnaker.gate.services.PipelineService$_setApplicationForExecution_closure2.doCall(PipelineService.groovy:222) at com.netflix.spinnaker.kork.core.RetrySupport.retry(RetrySupport.java:34) at com.netflix.spinnaker.kork.core.RetrySupport.retry(RetrySupport.java:27) at com.netflix.spinnaker.gate.services.PipelineService.setApplicationForExecution(PipelineService.groovy:222) at com.netflix.spinnaker.gate.services.PipelineService.deletePipeline(PipelineService.groovy:189) at com.netflix.spinnaker.gate.controllers.PipelineController.deletePipeline(PipelineController.groovy:279) at com.netflix.spinnaker.gate.service.PipelineServiceTest.invokeDeletePipelineExecution(PipelineServiceTest.java:135) --------- Co-authored-by: David Byron <[email protected]> (cherry picked from commit 15465c9) Co-authored-by: Kiran Godishala <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mapreturn type for the corresponding APIs causing the following error :