-
Notifications
You must be signed in to change notification settings - Fork 0
Add deploy markers configuration #97
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,9 +17,27 @@ jobs: | |
| working_directory: ~/Tools | ||
| steps: | ||
| - checkout | ||
| - run: | ||
| name: Plan deployment | ||
| command: | | ||
| circleci run release plan "${CIRCLE_JOB}" \ | ||
| --environment-name="default" \ | ||
| --component-name="${CIRCLE_PROJECT_REPONAME}" \ | ||
| --target-version="1.0.${CIRCLE_BUILD_NUM}-${CIRCLE_SHA1:0:7}" | ||
| - run: | ||
| name: "Deploy step" | ||
| command: echo "Deploying project..." | ||
| - run: | ||
| name: Update deployment status to running | ||
| command: circleci run release update "${CIRCLE_JOB}" --status=RUNNING | ||
| - run: | ||
|
Comment on lines
27
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Running set after deploy In the deploy job, the Deploy Marker is updated to RUNNING only after the deploy command executes, so the recorded deployment start/status is wrong and RUNNING is never emitted when the deploy step fails. This breaks the accuracy of deployment visibility and duration metrics. Agent Prompt
|
||
| name: Update deployment status to success | ||
| command: circleci run release update "${CIRCLE_JOB}" --status=SUCCESS | ||
| when: on_success | ||
| - run: | ||
| name: Update deployment status to failed | ||
| command: circleci run release update "${CIRCLE_JOB}" --status=FAILED | ||
|
Comment on lines
+23
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Non-unique deployment id All Deploy Marker plan/update commands use ${CIRCLE_JOB} as the deployment identifier, which
resolves to the constant job name "deploy" in this config. Multiple pipeline runs can overwrite each
other’s deployment records by updating the same id.
Agent Prompt
|
||
| when: on_fail | ||
|
Comment on lines
+30
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3. Marker updates fail deploy The marker update steps run circleci run release update ... without guarding failures, so transient tracking call failures can fail the deploy job even if the deployment succeeded. The on_fail marker step can also fail and obscure the original deployment failure. Agent Prompt
|
||
|
|
||
| workflows: | ||
| build-and-deploy: | ||
|
|
||
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.
Bug: The deployment status update step lacks
when: always, so it won't run if the preceding deployment step fails, leading to incomplete deployment tracking.Severity: MEDIUM
Suggested Fix
Add the
when: alwayscondition to the "Update deployment status to running" step. This ensures that the deployment status is updated regardless of whether the preceding deployment step succeeds or fails, providing more robust and accurate deployment tracking.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.