shore icon indicating copy to clipboard operation
shore copied to clipboard

False positive: shore save returns 200 instead of error on missing application

Open eyal-mor opened this issue 2 years ago • 0 comments

Pre Requisites

Description

Original Author: @slonokot When shore save -vvv is run against spinnaker for a pipeline name Secrets stages tests and application infradevx that doesn't exist (not infradevex) shore returns 200 HTTP code and no errors are reflected in the logs:

Steps to Reproduce

 shore save -vvv
DEBU[0000] Lazy Loading project path
DEBU[0000] Use `Getwd` (pwd) local path
INFO[0000] Render function started
DEBU[0000] GetProjectPath
DEBU[0000] Lazy Loading project path
DEBU[0000] Use `Getwd` (pwd) local path
DEBU[0000] GetProjectPath returned /test-secrets-pipeline
DEBU[0000] Args returned:
{\"application\":\"secrets-test\",\"example_value\":\"World\",\"pipeline\":\"secretstest-pipeline\"}
INFO[0000] calling Renderer.Render with projectPath /test-secrets-pipeline and renderArgs {\"application\":\"secrets-test\",\"example_value\":\"World\",\"pipeline\":\"secretstest-pipeline\"}
DEBU[0000] Renderer.Render returned successfully
INFO[0000] Calling Backend.SavePipeline
INFO[0001] Searching for Triggers with PipelineID needing replacement
INFO[0001] Searching for Stages with PipelineIDs needing replacement
INFO[0001] Pipeline Secrets stages tests found with id 5180d734-42de-443d-bebd-beab3214a6c1 in application infradevx
INFO[0003] Saved already existing pipeline with ID5180d734-42de-443d-bebd-beab3214a6c1
INFO[0003] Backend.SavePipeline returned
&{200  200 HTTP/1.1 1 1 map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Headers:[x-requested-with, content-type, authorization, X-RateLimit-App, X-Spinnaker-Priority] Access-Control-Allow-Methods:[POST, GET, OPTIONS, DELETE, PUT, PATCH] Access-Control-Allow-Origin:[*] Access-Control-Expose-Headers:[X-AUTH-REDIRECT-URL] Access-Control-Max-Age:[3600] Cache-Control:[no-cache, no-store, max-age=0, must-revalidate] Content-Length:[0] Date:[Sun, 29 Aug 2021 11:46:30 GMT] Expires:[0] Pragma:[no-cache] Strict-Transport-Security:[max-age=31536000 ; includeSubDomains] Vary:[Origin Access-Control-Request-Method Access-Control-Request-Headers] X-Content-Type-Options:[nosniff] X-Frame-Options:[DENY] X-Spinnaker-Request-Id:[51bebf4c-6246-4ae7-b744-b3b6db230ae7] X-Xss-Protection:[1; mode=block]] {} 0 [] false false map[] 0xc00011b800 0xc0000da6e0}
 shore --version
0.0.8

Expected behavior:

Actual behavior:

Reproduces how often:

Versions

Additional Information

eyal-mor avatar Feb 16 '23 09:02 eyal-mor