Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

RATIS-2206 introduced a problem in the release process: plain deploy:deploy fails for modules with packaging=jar. Previous test has not revealed this, because the first module is a pom, deployment was attempted, and it was expected to fail due to lack of authentication.

It turns out we cannot skip re-build of the project. However, we can reorder steps to ensure items published to Maven and Subversions are consistent.
(Alternatively we could publish files one-by-one using deploy:deploy-file, but it's error-prone.)

I think it is safe to publish to the Maven staging repo before adding files to Subversion locally, since it can be discarded if needed. So the order is now:

  1. prepare-src
  2. verify-bin (renamed from prepare-bin to better reflect its purpose)
  3. publish-mvn
  4. assembly
  5. publish-git
  6. publish-svn

Artifacts published to Maven and Subversion are both produced by the publish-mvn step.

Also added numeric prefix to the step names to avoid accidental usage in the old order.

Added -DdeployAtEnd=true flag to avoid partially published repo in case any module fails to re-build.

https://issues.apache.org/jira/browse/RATIS-2211

How was this patch tested?

Performed release steps. Deployed to local dir, to allow testing full deployment without authentication.

$ git checkout -b RATIS-2211-test

$ export RATISVERSION="3.2.0"  RC="-test-RATIS-2211"  CODESIGNINGKEY="..."

$ ./dev-support/make_rc.sh 1-prepare-src

$ ./dev-support/make_rc.sh 2-verify-bin

$ ./dev-support/make_rc.sh 3-publish-mvn -DaltDeploymentRepository=local::default::file:///tmp/ratis.staging-repo
...
[INFO] --- deploy:2.8.2:deploy (default-cli) @ ratis-assembly ---
[INFO] Using alternate deployment repository local::default::file:///tmp/ratis.staging-repo
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis/3.2.0/ratis-3.2.0.pom
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis/3.2.0/ratis-3.2.0.pom (42 kB at 21 MB/s)
Downloading from local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis/maven-metadata.xml
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis/maven-metadata.xml
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis/maven-metadata.xml (301 B at 301 kB/s)
...
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-sources.jar
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-sources.jar (222 kB at 222 MB/s)
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-tests.jar
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-tests.jar (329 kB at 165 MB/s)
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-test-sources.jar
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-test-sources.jar (142 kB at 142 MB/s)
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-javadoc.jar
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-server/3.2.0/ratis-server-3.2.0-javadoc.jar (299 kB at 150 MB/s)
...
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-assembly/3.2.0/ratis-assembly-3.2.0-src.tar.gz
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-assembly/3.2.0/ratis-assembly-3.2.0-src.tar.gz (807 kB at 161 MB/s)
Uploading to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-assembly/3.2.0/ratis-assembly-3.2.0-bin.tar.gz
Uploaded to local: file:///tmp/ratis.staging-repo/org/apache/ratis/ratis-assembly/3.2.0/ratis-assembly-3.2.0-bin.tar.gz (38 MB at 197 MB/s)
...
[INFO] BUILD SUCCESS
...
[INFO] Total time:  42.592 s

$ ./dev-support/make_rc.sh 4-assembly

@adoroszlai adoroszlai self-assigned this Dec 16, 2024
@adoroszlai adoroszlai requested a review from szetszwo December 16, 2024 15:02
Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

+1 the change looks good.

@OneSizeFitsQuorum , please see if you could take a look at this change.

}

publish-mvn(){
3-publish-mvn(){
Copy link
Contributor

Choose a reason for hiding this comment

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

How about move this function to line 124?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Left it here to clarify the actual diff.

Sure, we can move it.

Copy link
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

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

LGTM

@adoroszlai adoroszlai merged commit a0eada8 into apache:master Dec 17, 2024
12 checks passed
@adoroszlai adoroszlai deleted the RATIS-2211 branch December 17, 2024 07:09
@adoroszlai
Copy link
Contributor Author

Thanks @OneSizeFitsQuorum, @szetszwo for the review.

szetszwo pushed a commit that referenced this pull request Jan 9, 2025
szetszwo pushed a commit to szetszwo/ratis that referenced this pull request May 23, 2025
szetszwo pushed a commit to szetszwo/ratis that referenced this pull request May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants