Skip to content

Fix automated releases#13834

Closed
msujew wants to merge 1 commit intomasterfrom
msujew/fix-automated-release
Closed

Fix automated releases#13834
msujew wants to merge 1 commit intomasterfrom
msujew/fix-automated-release

Conversation

@msujew
Copy link
Copy Markdown
Member

@msujew msujew commented Jun 20, 2024

What it does

Updates our GitHub actions to retry in case they hit network related errors like rate limiting. This was also used in the old next publishing action:

- name: Publish NPM
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
retry_wait_seconds: 30
max_attempts: 3
retry_on: error
command: yarn publish:next
on_retry_command: git reset --hard
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # The variable name comes from here: https://github.com/actions/setup-node/blob/70b9252472eee7495c93bb1588261539c3c2b98d/src/authutil.ts#L48

Also removes the --canary option. That should hopefully fix the issue of unexpected minor versions (we currently publish all next releases as 1.46.0-next).

How to test

Nothing to test, we need to see whether it will work now :)

Review checklist

Reminder for reviewers

@msujew msujew added the repo issues specific to the repository label Jun 20, 2024
@msujew msujew requested a review from jfaltermeier June 20, 2024 13:06
retry_wait_seconds: 30
max_attempts: 3
retry_on: error
command: yarn publish:latest -- ${{ inputs.release_type }} && yarn publish:check
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publishing guide recommends using a specific command in case of publishing errors:
https://github.com/eclipse-theia/theia/blob/master/doc/Publishing.md#failures-during-publishing
npx lerna publish from-package --no-git-reset --no-git-tag-version --no-push

I'm not familiar with the reasoning behind this choice. Maybe @vince-fugnitto could provide some insight?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfaltermeier in the past we often encountered NPM socket errors which meant that only a subset of extensions were successfully published. In this state we cannot re-perform the publishing as it would fail with a message that the extension was already published. In order to only publish the extensions which were not previously published we manually ran the steps referenced in failure-during-publishing to continue with the release.

It's possible that the proposed workflow will fail when retrying if we are in a state where we partially published extensions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we run git reset --hard in between retries, running lerna publish from-package is not necessary. Just repeating the publish:latest command should work as expected. I don't think we need to adjust something.

Also, having two separate commands in the CI (for normal publishing + publishing following an error) would make this more complicated to maintain imo.

@msujew msujew closed this Jan 7, 2025
@msujew
Copy link
Copy Markdown
Member Author

msujew commented Jan 7, 2025

This was actually already fixed by #14445.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

repo issues specific to the repository

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants