Skip to content
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

ci: Improve accuracy of wait-for-circleci-workflow-status #29310

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Dec 18, 2024

Description

The GitHub Actions workflow wait-for-circleci-workflow-status has been updated to ensure that it waits for the correct workflow. Previously it always chose the most recent workflow for the given branch, but it may have chosen a workflow corresponding to the wrong commit. It has been updated to find one matching the same commit that triggered the GitHub Actions workflow.

A log has been added to help diagnose any future problems with this workflow, and to help with verification.

Open in GitHub Codespaces

Related issues

N/A

Manual testing steps

Check the logs of the "Wait for CircleCI workflow status" job, and see that the workflow ID it's waiting on is correct when making multiple successive commits (comparing the timing using the CircleCI dashboard)

Unfortunately the ID logged in the action is not shown on the CircleCI UI, but you can download the pipeline data with this command: curl 'https://circleci.com/api/v2/project/gh/MetaMask/metamask-extension/pipeline?branch=[branch]' > pipeline.json and look through the pipeline.json file for an entry that matches the logged ID. The number field is the pipeline number, which is in the CircleCI workflow URL (e.g. https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/[pipeline number]/workflows/[some other number])

Screenshots/Recordings

N/A

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

The GitHub Actions workflow `wait-for-circleci-workflow-status` has
been updated to ensure that it waits for the correct workflow.
Previously it always chose the most recent workflow for the given
branch, but it may have chosen a workflow corresponding to the wrong
commit. It has been updated to find one matching the same commit that
triggered the GitHub Actions workflow.
Previously it was returning a list. Instead now we're filtering the
list, then selecting the id from the first entry.
The two logs were consolidated into one, and the wording was improved.
Quotes were added around the variables to make it clearer in the case
where they are empty.
@Gudahtt Gudahtt marked this pull request as ready for review December 18, 2024 05:11
@Gudahtt Gudahtt requested a review from itsyoboieltr December 18, 2024 05:11
@metamaskbot
Copy link
Collaborator

Builds ready [d9c6677]
Page Load Metrics (2212 ± 258 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27631231865786377
domContentLoaded148932962180531255
load150433052212537258
domInteractive27242916833
backgroundConnect10113353014
firstReactRender17112602311
getState56719168
initialActions01000
loadScripts110027761693469225
setupStore75219157
uiStartup171837742555653314
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@Gudahtt Gudahtt added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Dec 18, 2024
@Gudahtt Gudahtt added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit 398ec97 Dec 19, 2024
99 checks passed
@Gudahtt Gudahtt deleted the wait-on-correct-workflow branch December 19, 2024 14:12
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Dec 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-extension-platform team-wallet-framework
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants