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

The toplevel module version commit should only happen if the release succeeds #846

Closed
markpatton opened this issue Nov 30, 2023 · 4 comments · Fixed by eclipse-pass/pass-core#73 or eclipse-pass/pass-support#78
Assignees
Milestone

Comments

@markpatton
Copy link
Contributor

Currently the release action updates the toplevel module version and then calls the release plugin. This can cause problems if the release fails because the commit will have been made. The version update should be done as part of the release plugin work if possible. It is updating the submodule versions.

@markpatton markpatton converted this from a draft issue Nov 30, 2023
@jabrah
Copy link
Contributor

jabrah commented Nov 30, 2023

We should probably also allow the release plugin to push (version bump) commits and tags itself, instead of pushing manually

@dkriethof dkriethof added this to the 1.3.0 milestone Nov 30, 2023
@markpatton markpatton moved this from Ready for Development to In Progress in Eclipse PASS Nov 30, 2023
@markpatton markpatton changed the title The toplevel module version update should be done by the maven release plugin The toplevel module version commit should only happen if the release succeeds Nov 30, 2023
@markpatton markpatton self-assigned this Nov 30, 2023
@markpatton
Copy link
Contributor Author

For release of child modules of main, pass-core and pass support it works like:

  1. Update parent dependency to release version
  2. Commit pom change
  3. Release plugin prepare
  4. Release plugin perform in release profile
  5. Update parent pom to new dev version (submodules should be at dev version)
  6. Commit pom change and push all changes
  7. Create docker image for dev by running maven deploy with release profile
  8. Push git tags
  9. Push docker images

@markpatton
Copy link
Contributor Author

markpatton commented Dec 1, 2023

One thought is the maven release plugin really isn't providing value. We're working around it more than taking advantage of it.

Proposal:

  1. Update parent dependency to release version
  2. Update version to release
  3. Run maven deploy
  4. Push release docker image
  5. Commit pom changes, create tag, and push changes
  6. Repeat the above with the next dev version

The deploy step is what sometimes fails trying to close the sonatype repository. But the upload to maven central actually succeeds.

If the deploy fails, we should ping maven central for 20 minutes, before giving up. But only it it fails on sonatype. Could check for exit code 1 and an error message like Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin.

If the deploy ends up failing completely, nothing will have been committed to github, no images will be pushed. We can just retry without making any changes later.

@markpatton
Copy link
Contributor Author

build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing

@markpatton markpatton moved this from In Progress to Peer Review/QA in Eclipse PASS Dec 19, 2023
@github-project-automation github-project-automation bot moved this from Peer Review/QA to Done in Eclipse PASS Dec 20, 2023
@dkriethof dkriethof moved this from Done to Deployed in Eclipse PASS Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants