Skip to content

Commit

Permalink
[fc] Repository: plone.releaser
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2024-05-07T12:14:17+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.releaser@0c6aa2a

Catch error when trying to change coredev branches.

Not everyone may have the branches available, or there may be some problem with it.
Fixes plone/plone.releaser#67

Files changed:
A news/67.bugfix
M plone/releaser/release.py
Repository: plone.releaser

Branch: refs/heads/master
Date: 2024-05-09T11:19:25+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.releaser@2568b39

Merge pull request #68 from plone/maurits-issue-67

Catch error when trying to change coredev branches.

Files changed:
A news/67.bugfix
M plone/releaser/release.py
  • Loading branch information
gforcada committed May 9, 2024
1 parent 3bb2954 commit 00b24e8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions last_commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ Repository: plone.releaser


Branch: refs/heads/master
Date: 2024-05-07T13:19:36+02:00
Date: 2024-05-07T12:14:17+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/plone.releaser/commit/34520e2bce7f8c52f04a5962243515fc73efbf5f
Commit: https://github.com/plone/plone.releaser/commit/0c6aa2a88ae4e506acd5337ab5a27c88cd02233a

No longer offer to push changes to buildout.coredev.
Catch error when trying to change coredev branches.

This is no longer what we ever want: the newly uploaded package will not yet be available on all PyPI mirrors.
Fixes https://github.com/plone/plone.releaser/issues/69.
Not everyone may have the branches available, or there may be some problem with it.
Fixes https://github.com/plone/plone.releaser/issues/67

Files changed:
A news/69.bugfix
A news/67.bugfix
M plone/releaser/release.py

b'diff --git a/news/69.bugfix b/news/69.bugfix\nnew file mode 100644\nindex 0000000..84ace0c\n--- /dev/null\n+++ b/news/69.bugfix\n@@ -0,0 +1,4 @@\n+No longer offer to push changes to buildout.coredev.\n+This is no longer what we ever want: the newly uploaded package will not yet be available on all PyPI mirrors.\n+Fixes `issue 69 <https://github.com/plone/plone.releaser/issues/69>`_.\n+[maurits]\ndiff --git a/plone/releaser/release.py b/plone/releaser/release.py\nindex 3027a6f..01767b6 100644\n--- a/plone/releaser/release.py\n+++ b/plone/releaser/release.py\n@@ -220,31 +220,15 @@ def update_core(data, branch=None):\n g.add("--all")\n print("Committing changes.")\n g.commit(message=message)\n- # When doing releases of several packages in a row,\n- # it is better to not push, because this means a needlessly high load on Jenkins.\n- # Also, if you create a release and immediately push,\n- # then Jenkins will not find the new release yet and fail:\n- # it takes a few minutes for the release to be propagated to all PyPI mirrors.\n- # Pushing still seems the best default, but let\'s have an easy way to not push.\n- print("Checking PLONE_RELEASER_MULTI_PACKAGES env variable.")\n- try:\n- multi = int(os.getenv("PLONE_RELEASER_MULTI_PACKAGES"))\n- except (TypeError, ValueError, AttributeError):\n- print(\n- "ERROR: could not parse PLONE_RELEASER_MULTI_PACKAGES env var. Ignoring it."\n- )\n- multi = False\n- if multi:\n- print(\n- "PLONE_RELEASER_MULTI_PACKAGES env variable set, so not pushing to coredev."\n- )\n- return\n- msg = "Ok to push coredev?"\n- if branch:\n- msg = f"Ok to push coredev {branch}?"\n- if ask(msg, default=True):\n- print("Pushing changes to server.")\n- g.push()\n+ # We used to offer pushing the coredev change, but this is no longer a\n+ # good idea.\n+ print(\n+ "WARNING: a change in one or more buildout.coredev branches was made. "\n+ "Please wait a few minutes and then push this change. Otherwise the "\n+ "newly uploaded package is not yet available on all PyPI mirrors. "\n+ "This would cause Jenkins and GitHub Actions to fail."\n+ )\n+ return\n \n \n def update_other_core_branches(data):\n'
b'diff --git a/news/67.bugfix b/news/67.bugfix\nnew file mode 100644\nindex 0000000..7e586dc\n--- /dev/null\n+++ b/news/67.bugfix\n@@ -0,0 +1,2 @@\n+Catch error when trying to change coredev branches.\n+Not everyone may have the branches available, or there may be some problem with it.\ndiff --git a/plone/releaser/release.py b/plone/releaser/release.py\nindex 3027a6f..6d90a40 100644\n--- a/plone/releaser/release.py\n+++ b/plone/releaser/release.py\n@@ -271,7 +271,15 @@ def _get_package_branch(package_name):\n \n g = git.Git(root_path)\n for branch_name in CORE_BRANCHES:\n- g.checkout(branch_name)\n+ try:\n+ g.checkout(branch_name)\n+ except git.exc.GitCommandError:\n+ print(\n+ f"WARNING: There was an error checking out coredev branch "\n+ f"{branch_name}. This means we cannot check if this branch needs an "\n+ f"update for {package_name}. Please check manually."\n+ )\n+ continue\n \n package_branch = _get_package_branch(package_name=package_name)\n if package_branch == reference_package_branch:\n'

Repository: plone.releaser


Branch: refs/heads/master
Date: 2024-05-09T11:18:39+02:00
Date: 2024-05-09T11:19:25+02:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/plone.releaser/commit/a49c70458a691642e13a904b59c57b340c3b6974
Commit: https://github.com/plone/plone.releaser/commit/2568b397dad87ba40a1e34016d80473b6aafff17

Merge pull request #70 from plone/maurits-no-coredev-push
Merge pull request #68 from plone/maurits-issue-67

No longer offer to push changes to buildout.coredev.
Catch error when trying to change coredev branches.

Files changed:
A news/69.bugfix
A news/67.bugfix
M plone/releaser/release.py

b'diff --git a/news/69.bugfix b/news/69.bugfix\nnew file mode 100644\nindex 0000000..84ace0c\n--- /dev/null\n+++ b/news/69.bugfix\n@@ -0,0 +1,4 @@\n+No longer offer to push changes to buildout.coredev.\n+This is no longer what we ever want: the newly uploaded package will not yet be available on all PyPI mirrors.\n+Fixes `issue 69 <https://github.com/plone/plone.releaser/issues/69>`_.\n+[maurits]\ndiff --git a/plone/releaser/release.py b/plone/releaser/release.py\nindex 3027a6f..01767b6 100644\n--- a/plone/releaser/release.py\n+++ b/plone/releaser/release.py\n@@ -220,31 +220,15 @@ def update_core(data, branch=None):\n g.add("--all")\n print("Committing changes.")\n g.commit(message=message)\n- # When doing releases of several packages in a row,\n- # it is better to not push, because this means a needlessly high load on Jenkins.\n- # Also, if you create a release and immediately push,\n- # then Jenkins will not find the new release yet and fail:\n- # it takes a few minutes for the release to be propagated to all PyPI mirrors.\n- # Pushing still seems the best default, but let\'s have an easy way to not push.\n- print("Checking PLONE_RELEASER_MULTI_PACKAGES env variable.")\n- try:\n- multi = int(os.getenv("PLONE_RELEASER_MULTI_PACKAGES"))\n- except (TypeError, ValueError, AttributeError):\n- print(\n- "ERROR: could not parse PLONE_RELEASER_MULTI_PACKAGES env var. Ignoring it."\n- )\n- multi = False\n- if multi:\n- print(\n- "PLONE_RELEASER_MULTI_PACKAGES env variable set, so not pushing to coredev."\n- )\n- return\n- msg = "Ok to push coredev?"\n- if branch:\n- msg = f"Ok to push coredev {branch}?"\n- if ask(msg, default=True):\n- print("Pushing changes to server.")\n- g.push()\n+ # We used to offer pushing the coredev change, but this is no longer a\n+ # good idea.\n+ print(\n+ "WARNING: a change in one or more buildout.coredev branches was made. "\n+ "Please wait a few minutes and then push this change. Otherwise the "\n+ "newly uploaded package is not yet available on all PyPI mirrors. "\n+ "This would cause Jenkins and GitHub Actions to fail."\n+ )\n+ return\n \n \n def update_other_core_branches(data):\n'
b'diff --git a/news/67.bugfix b/news/67.bugfix\nnew file mode 100644\nindex 0000000..7e586dc\n--- /dev/null\n+++ b/news/67.bugfix\n@@ -0,0 +1,2 @@\n+Catch error when trying to change coredev branches.\n+Not everyone may have the branches available, or there may be some problem with it.\ndiff --git a/plone/releaser/release.py b/plone/releaser/release.py\nindex 01767b6..2a92c2b 100644\n--- a/plone/releaser/release.py\n+++ b/plone/releaser/release.py\n@@ -255,7 +255,15 @@ def _get_package_branch(package_name):\n \n g = git.Git(root_path)\n for branch_name in CORE_BRANCHES:\n- g.checkout(branch_name)\n+ try:\n+ g.checkout(branch_name)\n+ except git.exc.GitCommandError:\n+ print(\n+ f"WARNING: There was an error checking out coredev branch "\n+ f"{branch_name}. This means we cannot check if this branch needs an "\n+ f"update for {package_name}. Please check manually."\n+ )\n+ continue\n \n package_branch = _get_package_branch(package_name=package_name)\n if package_branch == reference_package_branch:\n'

0 comments on commit 00b24e8

Please sign in to comment.