ngbatis icon indicating copy to clipboard operation
ngbatis copied to clipboard

test failure in release v1.1.0

Open wey-gu opened this issue 2 years ago • 9 comments

as title

wey-gu avatar Nov 29 '22 03:11 wey-gu

I referred to the snapshot workflow and tried to solve it #96

CorvusYe avatar Nov 29 '22 04:11 CorvusYe

Maybe I know why the failure occurs. When the snapshot workflow is completed, v1.1.0 has been deployed. When the release workflow runs, v1.1.0 exists in maven repo, and the release version cannot be rewritten. It's right ? @Nicole00

Although the workflow failed, it was published successfully. @wey-gu https://search.maven.org/artifact/org.nebula-contrib/ngbatis/1.1.0/jar

https://github.com/nebula-contrib/ngbatis/actions/runs/3570825302/jobs/6002147187 image

CorvusYe avatar Nov 30 '22 07:11 CorvusYe

Before we perform this locally with -e to get more debug info, I guess it's due to somehow, yesterday, this release was published once for 1.1.0.

Error:  Nexus Staging Rules Failure Report
Error:  ==================================
Error:  
Error:  Repository "orgnebula-contrib-1014" failures
Error:    Rule "RepositoryWritePolicy" failures
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/nebula-contrib/ngbatis/1.1.0/ngbatis-1.1.0-javadoc.jar'
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/nebula-contrib/ngbatis/1.1.0/ngbatis-1.1.0.pom'
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/nebula-contrib/ngbatis/1.1.0/ngbatis-1.1.0-tests.jar'
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/nebula-contrib/ngbatis/1.1.0/ngbatis-1.1.0-sources.jar'
Error:      * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/nebula-contrib/ngbatis/1.1.0/ngbatis-1.1.0.jar'
Error:  
Error:  

Screenshot 2022-11-30 at 16 09 15

@CorvusYe could you please try this, to do a release with vername: 1.1.1 or 1.1.0-ga ?

ref: https://mvnrepository.com/artifact/org.nebula-contrib/ngbatis/1.1.0

wey-gu avatar Nov 30 '22 08:11 wey-gu

@wey-gu I created another PR of 1.1.1

CorvusYe avatar Nov 30 '22 08:11 CorvusYe

image Published successfully by snapshot, and release workflow failed again.😂😂

CorvusYe avatar Nov 30 '22 09:11 CorvusYe

Now I know why it's failed, it's due to the snapshot was triggered, too, and it's already published to maven.

see https://github.com/nebula-contrib/ngbatis/actions/runs/3581743231/jobs/6025157176

wey-gu avatar Nov 30 '22 09:11 wey-gu

Yes, we should ensure release not trigger snapshot, maybe we only enable snapshot every night? Or released version in separate branch/tag rather than master and put the gh action for snapshot only in master.

wey-gu avatar Nov 30 '22 09:11 wey-gu

If different workflows use different maven profiles to publish different versions (snapshots and releases) with the same code, it may be a better practice.

CorvusYe avatar Nov 30 '22 09:11 CorvusYe

If different workflows use different maven profiles to publish different versions (snapshots and releases) with the same code, it may be a better practice.

agreed

wey-gu avatar Nov 30 '22 09:11 wey-gu