API deployment races npm publish
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 11
- Avg merge
- 7h 33m
- Merged PRs (30d)
- 11
Description
On the last two API prod builds run after a dispatch from the bcd repo, our npm update has run before bcd's npm publish has fully propagated, and we've fetched the last but one version:
e.g. https://github.com/mdn/browser-compat-data/releases/tag/v8.0.10 was released, and kicked off a build, but 8.0.9 was fetched instead: https://github.com/mdn/bcd-utils/actions/runs/31111332021/job/92649598856#step:5:13
This is a recurrence of https://github.com/mdn/bcd-utils/issues/133
It seems like things have gotten slower in npm land lately, so even if the npm publish command has exited, that version isn't available for everyone through npm yet.
One solution for this could be to add the version to the client_payload of the repository_dispatch and poll in the deploy job until that version appears on npm.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the deploy-prod-api.yml workflow and the repository_dispatch entry point described in the issue; trace how the API build obtains the bcd version. Check the linked failed run and the earlier issue for the current npm update behavior. Done means a dispatch identifies the intended version, the deployment waits until that version is available through npm, and the workflow no longer deploys the previous version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100