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

[Bug] Maven 1.1.0 failed Central Sync due to multiple errors #699

Closed
peterzhuamazon opened this issue Oct 5, 2021 · 7 comments · Fixed by #703
Closed

[Bug] Maven 1.1.0 failed Central Sync due to multiple errors #699

peterzhuamazon opened this issue Oct 5, 2021 · 7 comments · Fixed by #703
Assignees
Labels
bug Something isn't working release untriaged Issues that have not yet been triaged v1.1.0

Comments

@peterzhuamazon
Copy link
Member

Describe the bug

[Bug] Maven 1.1.0 failed Central Sync due to multiple errors.

When we try to release Maven Artifacts for 1.1.0 OpenSearch to Maven Central through sonatype, we encounter these errors that block us from closing.

Here are all the issues we see:

Event: Failed: Javadoc Validation:

Event: Failed: Javadoc Validation
Tuesday, October 05, 2021 17:07:20 EDT (GMT-0400)
typeId	javadoc-staging
failureMessage	Missing: no javadoc jar found in folder '/org/opensearch/performanceanalyzer-rca/1.1.0.0'

Event: Failed: Checksum Validation:

Event: Failed: Checksum Validation
Tuesday, October 05, 2021 17:07:21 EDT (GMT-0400)
typeId	checksum-staging
failureMessage	Required SHA-1: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0-javadoc.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0-javadoc.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0.pom.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0.pom.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0-sources.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0-sources.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0.module.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0.module.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0-sources.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0-sources.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0-javadoc.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0-javadoc.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0.pom.sha1'
failureMessage	Required MD5: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0.pom.md5'
failureMessage	Required SHA-1: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/common-utils/1.1.0.0/common-utils-1.1.0.0.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0.pom.sha1'
failureMessage	Required MD5: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0.pom.md5'
failureMessage	Required SHA-1: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0-javadoc.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0-javadoc.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0-sources.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/notification/1.1.0.0/notification-1.1.0.0-sources.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0-javadoc.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0-javadoc.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0.module.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0.module.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0.pom.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0.pom.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0-sources.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0-sources.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/performanceanalyzer-rca/1.1.0.0/performanceanalyzer-rca-1.1.0.0.pom.sha1'
failureMessage	Required MD5: '/org/opensearch/performanceanalyzer-rca/1.1.0.0/performanceanalyzer-rca-1.1.0.0.pom.md5'
failureMessage	Required SHA-1: '/org/opensearch/performanceanalyzer-rca/1.1.0.0/performanceanalyzer-rca-1.1.0.0.module.sha1'
failureMessage	Required MD5: '/org/opensearch/performanceanalyzer-rca/1.1.0.0/performanceanalyzer-rca-1.1.0.0.module.md5'
failureMessage	Required SHA-1: '/org/opensearch/performanceanalyzer-rca/1.1.0.0/performanceanalyzer-rca-1.1.0.0.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/performanceanalyzer-rca/1.1.0.0/performanceanalyzer-rca-1.1.0.0.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0-javadoc.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0-javadoc.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0-sources.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0-sources.jar.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0.pom.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0.pom.md5'
failureMessage	Required SHA-1: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0.jar.sha1'
failureMessage	Required MD5: '/org/opensearch/opensearch-job-scheduler-spi/1.1.0.0/opensearch-job-scheduler-spi-1.1.0.0.jar.md5'

Event: Failed: POM Validation:

Event: Failed: POM Validation
Tuesday, October 05, 2021 17:07:22 EDT (GMT-0400)
typeId	pom-staging
failureMessage	Invalid POM: /org/opensearch/opensearch-performance-analyzer/1.1.0.0/opensearch-performance-analyzer-1.1.0.0.pom: License information missing, Developer information missing
failureMessage	Invalid POM: /org/opensearch/opensearch-job-scheduler/1.1.0.0/opensearch-job-scheduler-1.1.0.0.pom: License information missing, Developer information missing
failureMessage	Invalid POM: /org/opensearch/performanceanalyzer-rca/1.1.0.0/performanceanalyzer-rca-1.1.0.0.pom: Project name missing, Project description missing, Project URL missing, License information missing, SCM URL missing, Developer information missing

Event: Failed: Sources Validation:

Event: Failed: Sources Validation
Tuesday, October 05, 2021 17:07:37 EDT (GMT-0400)
typeId	sources-staging
failureMessage	Missing: no sources jar found in folder '/org/opensearch/performanceanalyzer-rca/1.1.0.0'

Because of these errors, we are not able to close the repo, and proceed to publish the 1.1.0 release in Maven Central.

In 1.0.0, @peternied and @mch2 have removed PA in order to complete the release.
This time we are seeing more errors coming from plugin specifically.

Thanks.

To reproduce

See above.

Expected behavior

Click Close in Sonatype should close the repo.

Screenshots

Error screenshot:
Screen Shot 2021-10-05 at 6 30 10 PM

Host / Environment

No response

Additional context

No response

Relevant log output

No response

@dblock
Copy link
Member

dblock commented Oct 6, 2021

We should not be publishing job-scheduler, only SPI, that fix would be to remove https://github.com/opensearch-project/opensearch-build/blob/main/bundle-workflow/scripts/components/job-scheduler/build.sh#L63

@peternied
Copy link
Member

Existing issues have been resolved but release was stopped with this error:

typeId | RepositoryWritePolicy
-- | --
failureMessage | Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/opensearch/common-utils/maven-metadata-local.xml'
failureMessage | Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/opensearch/notification/maven-metadata-local.xml'
failureMessage | Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/org/opensearch/opensearch-job-scheduler-spi/maven-metadata-local.xml'

@dblock
Copy link
Member

dblock commented Oct 6, 2021

@peternied pls recap all the manual steps you did to unblock opensearch-1007 #close

@peternied
Copy link
Member

peternied commented Oct 7, 2021

Script to generate missing checksums, gen-checksum.sh

echo "Deleting any existing artifacts from $1"
find $1 -type f -name '*.md5' | xargs rm
find $1 -type f -name '*.sha1' | xargs rm
find $1 -type f -name '*.sha256' | xargs rm
find $1 -type f -name '*.sha512' | xargs rm


echo "Generated new checksums"
for file in $(find $1 -type f)
do
  if [ ${file##*.} != "asc" ]
  then
  echo "Creating checksum for $file"
  (md5sum $file | cut -d ' ' -f 1) > $file.md5 
  (sha1sum $file | cut -d ' ' -f 1) > $file.sha1
  (sha256sum $file | cut -d ' ' -f 1) > $file.sha256
  (sha512sum $file | cut -d ' ' -f 1) > $file.sha512
  fi
done

Note: This is documentation of the process used for this release, not what we should do and many of these steps have already been mitigated with other issues resolved in this and component repositories

Prereqs:

  1. Install maven
  2. export env variables for the sonatype release see stage-maven-release.sh
  3. Download the signed artifacts from s3://artifact-bucket-stack-buildbucket-9omh0hnpg12q/builds/1.1.0/405/x64/ to the local disk

Remediation steps:

  1. Delete artifacts that should not be published
    • rm -rf ./org/opensearch-performance-analyzer
    • rm -rf ./org/opensearch/opensearch-job-scheduler
    • rm -rf ./org/opensearch/performanceanalyzer-rca
  2. Rename the maven-metadata-local.xml to maven-metadata.xml
    • mv ./org/opensearch/common-utils/maven-metadata-local.xml ./org/opensearch/common-utils/maven-metadata.xml
    • mv ./org/opensearch/notifications/maven-metadata-local.xml ./org/opensearch/notifications/maven-metadata.xml
    • mv ./org/opensearch/opensearch-job-scheduler-spi/maven-metadata-local.xml ./org/opensearch/opensearch-job-scheduler-spi/maven-metadata.xml
  3. Generate all of the missing checksums
    • gen-checksum.sh ./org/opensearch/common-utils
    • gen-checksum.sh ./org/opensearch/notifications
    • gen-checksum.sh ./org/opensearch/opensearch-job-scheduler-spi
  4. Make sure there is no properties file in the root
    • rm ./*.properties
  5. Deploy the modified artifacts to sonatype
    • ./publish/stage-maven-release.sh signing-fix/artifacts

Deploy Artifacts

  1. Go to https://aws.oss.sonatype.org/index.html#stagingRepositories
  2. Find the staging repo created with the deployment
  3. close the repository, wait up to 20 minutes while checksums and signatures are validated
  4. release the repository, wait up to 24 hours for the artifacts to be visible in public, see

@dblock
Copy link
Member

dblock commented Oct 7, 2021

  1. Delete artifacts that should not be published

This was fixed in opensearch-project/job-scheduler#71 and #703

  1. Rename the maven-metadata-local.xml to maven-metadata.xml

The maven-metadata-local.xml comes from publishing to ~/.m2, and it's being removed when we publish via publishShadowPublicationToMavenLocal to fix signatures. So neither of these files will be present in 1.2. Is that going to be an issue? @peternied did you try to delete the -local.xml as a first solution?

  1. Generate all of the missing checksums

Fixed as above.

  1. Make sure there is no properties file in the root

Where do we see one in the build today? I can't find any.

@peternied
Copy link
Member

peternied commented Oct 7, 2021

  1. Make sure there is no properties file in the root

Where do we see one in the build today? I can't find any.

While the stage-maven-release.sh release script runs it puts a XXXXXXXXXXX.properties in the same directory as the maven artifacts. When I had to rerun the script this artifact would be uploaded and I would be unable to remove via the Sonatype UX, prevent closing the repository. Tracking this with #712

@peternied
Copy link
Member

peternied commented Oct 7, 2021

  1. Rename the maven-metadata-local.xml to maven-metadata.xml

The maven-metadata-local.xml comes from publishing to ~/.m2, and it's being removed when we publish via publishShadowPublicationToMavenLocal to fix signatures. So neither of these files will be present in 1.2. Is that going to be an issue? @peternied did you try to delete the -local.xml as a first solution?

I did not attempt to remove the file. Do we need the maven-metadata.xml at all, if not, we can alter the publishing process to filter them out before starting. Tracking with #713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release untriaged Issues that have not yet been triaged v1.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants