-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(web): fix the mismatches in the return types of APIs in gate and orca #1883
fix(web): fix the mismatches in the return types of APIs in gate and orca #1883
Conversation
…es of gate and orca when delete pipeline execution api is invoked
|
||
@Autowired ObjectMapper objectMapper; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this in these tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was asking about the FilterRegistrationBean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it turns out that it is needed to silence warnings about e.g. missing X-SPINNAKER-USER, X-SPINNAKER-ACCOUNTS warnings...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@Mergifyio backport release-1.37.x |
✅ Backports have been created
|
…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 <dbyron@salesforce.com> (cherry picked from commit 15465c9)
…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 <dbyron@salesforce.com> (cherry picked from commit 15465c9) Co-authored-by: Kiran Godishala <53332225+kirangodishala@users.noreply.github.com>
Map
return type for the corresponding APIs causing the following error :