Skip to content

Avoid SVN timeouts during publishing to dotorg#79919

Draft
desrosj wants to merge 17 commits into
trunkfrom
fix/svn-timeouts-during-publishing-to-dotorg
Draft

Avoid SVN timeouts during publishing to dotorg#79919
desrosj wants to merge 17 commits into
trunkfrom
fix/svn-timeouts-during-publishing-to-dotorg

Conversation

@desrosj

@desrosj desrosj commented Jul 6, 2026

Copy link
Copy Markdown
Member

What?

This modifies the logic responsible for committing changes to the WordPress.org plugin repository to be less likely to encounter timeout issues.

Closes #79804.

Why?

This workflow frequently encounters timeouts, which makes it appear like the release has not been published. However, the release often is published despite the error. This makes it quite confusing to know what needs to be addressed and what was successful, and can lead to contributors unintentionally ignoring or missing legitimate errors.

How?

In the current state, the full contents of the plugin are transmitted twice in the same transaction. This PR splits the operations into two atomic transactions:

  • One that commits all changes to trunk
  • One that creates the new tag.
    The tagging transaction has also been changed to a remote server-side transaction, which does not read, download, or upload any file content and relies on the "cheap copy" in SVN.

Because the upload-tag step creates a tag for a version after trunk has been updated to a newer version, the same cheap copy command cannot be used and the full contents of the plugin needs to be transmitted during the commit. This could likely be improved, but it's not handled in this PR for the time being because it's a less common path.

The committing and tagging logic have also been split into separate jobs. To improve tagging commands, branches are now utilized in the .org directory to allow for improved logic around tagging releases that occur after a newer one has been published in trunk.

Use of AI Tools

Yes. Claude Code was used to create the initial draft of this PR before being reviewed by myself.

@desrosj desrosj requested a review from Copilot July 6, 2026 20:27
@desrosj desrosj self-assigned this Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @Copilot.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: Copilot.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: bgrgicak <berislavgrgicak@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copilot AI left a comment

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.

Pull request overview

Updates the GitHub Actions workflow that publishes Gutenberg releases to the WordPress.org plugin SVN repository to reduce the likelihood of SVN timeouts and make failures less confusing during releases.

Changes:

  • Splits “publish trunk” and “create tag” into separate SVN transactions, with tagging performed as a server-side svn cp.
  • Switches the plugin repo URL from a hard-coded value to a GitHub Actions variable.
  • Increases SVN import timeout to 600s and breaks download/unzip/cleanup into discrete steps.

Comment thread .github/workflows/upload-release-to-plugin-repo.yml Outdated
Comment thread .github/workflows/upload-release-to-plugin-repo.yml Outdated
Comment thread .github/workflows/upload-release-to-plugin-repo.yml Outdated
@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Jul 6, 2026
@desrosj desrosj added this to the Gutenberg 23.6 milestone Jul 6, 2026
@desrosj desrosj requested review from t-hamano and tyxla July 6, 2026 20:30
@desrosj desrosj changed the title Fix/svn timeouts during publishing to dotorg Avoid SVN timeouts during publishing to dotorg Jul 6, 2026
Comment thread .github/workflows/upload-release-to-plugin-repo.yml

@ramonjd ramonjd left a comment

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.

As far as I can tell, this looks like a good direction. Should we get it in to try?

There are some other PRs going, e.g., #79858 and #79884 but that's more about merge order I guess.

Comment thread .github/workflows/upload-release-to-plugin-repo.yml Outdated

@Mamaduka Mamaduka left a comment

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.

Thanks, @desrosj!

Comment on lines +261 to +275
- name: Commit changes
if: steps.check_svn_tag.outputs.exists != 'true'
working-directory: ./trunk
run: |
svn st | grep '^?' | awk '{print $2}' | xargs -r svn add
svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm
svn cp . "../tags/$VERSION"
svn commit . "../tags/$VERSION" \
-m "Releasing version $VERSION" \
svn commit -m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
--config-option=servers:global:http-timeout=600

- name: Tag the new version
if: steps.check_svn_tag.outputs.exists != 'true'
run: |
svn cp "$PLUGIN_REPO_URL/trunk" "$PLUGIN_REPO_URL/tags/$VERSION" \
-m "Tagging version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
--config-option=servers:global:http-timeout=600

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.

Spotted with the help of an AI agent.

This split makes the release easier to recover from, but the tag step now copies $PLUGIN_REPO_URL/trunk without pinning the revision created by the preceding svn commit.

For URL-to-URL copies, Subversion uses HEAD when no source revision is supplied, so a concurrent manual/workflow update to WordPress.org SVN trunk between these two steps could make tags/$VERSION point at different contents than the commit this run just produced.

The old working-copy copy avoided that by committing trunk and tag together. If we want the new cheap server-side copy, we should capture the revision from the trunk commit and copy that exact revision, for example:

commit_output="$( svn commit -m "Releasing version $VERSION" ... )"
echo "$commit_output"
trunk_revision="$( sed -nE 's/^Committed revision ([0-9]+)\.$/\1/p' <<< "$commit_output" )"

svn cp "$PLUGIN_REPO_URL/trunk@$trunk_revision" "$PLUGIN_REPO_URL/tags/$VERSION" \
  -m "Tagging version $VERSION" \
  --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
  --config-option=servers:global:http-timeout=600

The exact parsing can be adjusted, but the important part is that tags/$VERSION is created from the revision this run just committed, not whatever trunk happens to be at tag time.


Reference checked: Subversion svn copy docs document URL-to-URL copies as server-side copies and note that URL sources use HEAD when no peg revision is supplied.

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.

Came here to highlight this. If Tag the new version fails after Commit changes succeeds, trunk will be updated but the version will be untagged.

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.

Hmm. There should never be two people trying to commit to the .org repository at the same time. And concurrency from the GH Actions workflow should prevent two workflow runs from committing at the same time.

I think that there should be an equivalent @committers Version X.Y of the Gutenberg plugin is being released. announcement in Slack similar to the Core release would be sufficient to avoid this.

Very few people actually have commit access to the plugin itself, and releasing is almost entirely handled through this workflow. So I don't know how this scenario can realistically occur.

@desrosj

desrosj commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

@copilot I've gone and made some larger changes to this PR to simplify/consolidate logic and separate the tagging and committing operations into separate jobs.

Please re-review the PR.

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@copilot I've gone and made some larger changes to this PR to simplify/consolidate logic and separate the tagging and committing operations into separate jobs.

Please re-review the PR.

Reviewed. One bug found and fixed in the new tag-release job: SVN_PATH on line 375 used should_update_trunk && 'trunk' || format(...), but GitHub Actions outputs are always strings — the string 'false' is non-empty and therefore truthy, so SVN_PATH would have always resolved to 'trunk' regardless of the actual value. Fixed in the latest commit by using an explicit == 'true' comparison.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.

Comment thread .github/workflows/upload-release-to-plugin-repo.yml Outdated
Comment thread .github/workflows/upload-release-to-plugin-repo.yml
Comment thread .github/workflows/upload-release-to-plugin-repo.yml Outdated
Comment thread .github/workflows/upload-release-to-plugin-repo.yml Outdated
Comment thread .github/workflows/upload-release-to-plugin-repo.yml
@desrosj

desrosj commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Converting this to Draft state so #79858 can be merged first and conflicts can be resolved.

@desrosj desrosj marked this pull request as draft July 10, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Changelog and upload Gutenberg plugin to WordPress.org plugin repo failed with '/gutenberg' path not found

7 participants