Skip to content

Conversation

@PhilipSkinner
Copy link

@PhilipSkinner PhilipSkinner commented Aug 14, 2023

Summary

Periodically this step in the pipeline will fail - this requires APIM producers to have to press the retry button in order to get a successful build. The manual retry process is normally successful after only 1 retry.

The error thrown here is a 401 - this makes me believe that token created within the Get Apigee Access Token step was failing.

jq is being used to extract the .access_token path from the JSON response - previously it was not returning an error code when the payload did not contain the path. This updates the jq call with the -e flag which will error when .access_token is not within the response.

An automated retry mechanism for when this error occurs has been added to this step. It uses the built in azure devops retryCountOnTaskFailure which will automatically back off on subsequent failures.

See https://learn.microsoft.com/en-us/azure/devops/pipelines/process/tasks?view=azure-devops&tabs=yaml#number-of-retries-if-task-failed

Periodically this step in the pipeline will fail - this
requires APIM producers to have to press the retry button
in order to get a successful build. The manual retry process
is normally successful after only 1 retry.

The error thrown here is a 401 - this makes me believe that
token created within the `Get Apigee Access Token` step was
failing.

`jq` is being used to extract the .access_token path from
the JSON response - previously it was not returning an error
code when the payload did not contain the path. This updates
the `jq` call with the `-e` flag which will error when
`.access_token` is not within the response.

An automated retry mechanism for when this error occurs has
been added to this step. It uses the built in azure devops
retryCountOnTaskFailure which will automatically back off
on subsequent failures.

See https://learn.microsoft.com/en-us/azure/devops/pipelines/process/tasks?view=azure-devops&tabs=yaml#number-of-retries-if-task-failed
@PhilipSkinner PhilipSkinner force-pushed the CCM-981-proxy-deployment-retries branch from cfb7e35 to 8cfd805 Compare September 14, 2023 15:03
@PhilipSkinner
Copy link
Author

Updated the PR with where I believe the issue is occuring - within the jq call when getting the access token for apigee edge.

@PhilipSkinner
Copy link
Author

I updated this script to look for an invalid path within the JSON response - .access_token_bad. This is the result of this running on the CI for a comms manager PR pipeline:

image

@acarriedev acarriedev merged commit e173704 into master Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants