Skip to content
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 (backport #1883)#1884

Merged
mergify[bot] merged 1 commit intorelease-1.37.xfrom
mergify/bp/release-1.37.x/pr-1883
Mar 1, 2025
Merged

fix(web): fix the mismatches in the return types of APIs in gate and orca (backport #1883)#1884
mergify[bot] merged 1 commit intorelease-1.37.xfrom
mergify/bp/release-1.37.x/pr-1883

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 1, 2025

  • While some of the Orca's API have void return types, Gate has Map return type for the corresponding APIs causing the following error :
Failed to process response body: No content to map due to end-of-input\n at [Source: (okhttps.ResponseBody$BomAwareReader); line:1, column:0)

…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)
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Mar 1, 2025
@mergify mergify bot added the auto merged label Mar 1, 2025
@mergify mergify bot merged commit de72fa6 into release-1.37.x Mar 1, 2025
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants