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

Fails to report error during publib-maven #723

Closed
kaizencc opened this issue Apr 20, 2023 · 1 comment
Closed

Fails to report error during publib-maven #723

kaizencc opened this issue Apr 20, 2023 · 1 comment

Comments

@kaizencc
Copy link

kaizencc commented Apr 20, 2023

See: https://github.com/cdklabs/awscdk-asset-node-proxy-agent/actions/runs/4624066296/jobs/8230436553

Looks like publib-maven is failing with:

Error:  
Error:  Nexus Staging Rules Failure Report
Error:  ==================================
Error:  
Error:  Repository "softwareamazon-5342" failures
Error:    Rule "RepositoryWritePolicy" failures
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/software/amazon/awscdk/cdk-asset-node-proxy-agent-v5/2.0.120/cdk-asset-node-proxy-agent-v5-2.0.120.jar'
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/software/amazon/awscdk/cdk-asset-node-proxy-agent-v5/2.0.120/cdk-asset-node-proxy-agent-v5-2.0.120-sources.jar'
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/software/amazon/awscdk/cdk-asset-node-proxy-agent-v5/2.0.120/cdk-asset-node-proxy-agent-v5-2.0.120-javadoc.jar'
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/software/amazon/awscdk/cdk-asset-node-proxy-agent-v5/2.0.120/cdk-asset-node-proxy-agent-v5-2.0.120.pom'
Error:  
Error:  
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.651 s
[INFO] Finished at: 2023-04-19T01:04:06Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.5:release (default-cli) on project dummy: Could not perform action: there are failing staging rules!: Staging rules failure! -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

But the github action eventually reports success.

The reason is here:

publib/bin/publib-maven

Lines 262 to 268 in 3a4a114

if [ ${PIPESTATUS[0]} -ne 0 ]; then
if cat ${release_output} | grep "does not allow updating artifact" | grep -q ".pom"; then
echo "⚠️ Artifact already published. Skipping"
else
error "Release failed"
fi
fi

We may be overindexing on the magic string "does not allow updating artifacts" because it is not true in this case that we are trying to publish the same artifact.

@kaizencc
Copy link
Author

Confirm that this error was a result of old maven credentials and not that the artifact was already published

@mrgrain mrgrain closed this as completed Dec 13, 2023
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

No branches or pull requests

2 participants