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

neo4j/5.26.0 package update #36123

Merged
merged 3 commits into from
Dec 24, 2024
Merged

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Dec 9, 2024

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Dec 9, 2024
Copy link
Contributor Author

octo-sts bot commented Dec 9, 2024

Gen AI suggestions to solve the build error:

• Detected Error: tar: can't open 'packaging/standalone/target/neo4j-*.tar.gz': No such file or directory

• Error Category: Build

• Failure Point: The final packaging step after Maven build when trying to extract the tar.gz artifact

• Root Cause Analysis: The Maven build appears to have warnings but completed, however the expected neo4j-*.tar.gz artifact was not generated in the expected location. This suggests the Maven build may have silently failed to produce the distribution archive.

• Suggested Fix:

  1. Modify the Maven command to explicitly build the distribution:
pipeline:
  - runs: |
      export LANG=en_US.UTF-8
      mvn package -DskipTests=true -T$(nproc)C -q -P deployment-only
  1. Add explicit error checking:
  - runs: |
      export LANG=en_US.UTF-8
      mvn package -DskipTests=true -T$(nproc)C -q -P deployment-only
      
      if [ ! -f packaging/standalone/target/neo4j-*.tar.gz ]; then
        echo "Distribution archive not found"
        exit 1
      fi

• Explanation:

  • The -P deployment-only profile explicitly enables Neo4j's distribution packaging
  • The default build may skip distribution assembly without the profile
  • Adding error checking makes build failures more obvious

• Additional Notes:

  • The XStream and Scala warnings are not causing the failure
  • The tar command fails because the previous steps didn't produce the expected artifact
  • Consider adding -B to Maven command to run in non-interactive mode
  • May want to add -Dquiet=true to reduce Maven output spam

• References:

Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
@mamccorm mamccorm force-pushed the wolfictl-be92fdf8-fd5f-40a4-a1fe-4f14c0fd8580 branch from bf64ab6 to c9d7695 Compare December 12, 2024 01:29
Copy link
Contributor Author

octo-sts bot commented Dec 12, 2024

Gen AI suggestions to solve the build error:

Based on the build error output, I'll analyze and provide a solution:

• Detected Error: tar: can't open 'packaging/standalone/target/neo4j-*.tar.gz': No such file or directory

• Error Category: Build

• Failure Point: Final packaging step in the pipeline where it attempts to extract the built Neo4j tarball

• Root Cause Analysis: The Maven build appears to complete (with warnings) but the expected Neo4j tarball was not generated in the expected location. This suggests the Maven build target for the standalone package was not properly executed.

• Suggested Fix:

pipeline:
  - uses: git-checkout
    with:
      repository: https://github.com/neo4j/neo4j
      tag: ${{package.version}}
      expected-commit: 17dc7f7e1787c451938b97666a06afd3695987ca

  - uses: maven/pombump

  - runs: |
      export LANG=en_US.UTF-8
      
      # Build the standalone distribution specifically
      mvn package -DskipTests=true -T$(nproc)C -q -pl packaging/standalone -am
      
      mkdir -p ${{targets.destdir}}/usr/share/java/neo4j
      
      tar --strip-components=1 -xf packaging/standalone/target/neo4j-community-${{package.version}}-unix.tar.gz -C ${{targets.destdir}}/usr/share/java/neo4j
      
      mkdir -p ${{targets.destdir}}/usr/bin
      for i in neo4j neo4j-admin cypershell; do
        ln -sf /usr/share/java/neo4j/bin/$i ${{targets.destdir}}/usr/bin/$i
      done

• Explanation:

  1. The original build wasn't specifically targeting the standalone package
  2. The fix explicitly builds the standalone module and its dependencies
  3. The tarball name has been made more specific to match Neo4j's actual output format
  4. The -pl flag targets the specific module while -am builds dependent modules

• Additional Notes:

  • The XStream and Scala warnings in the build output are not causing the failure
  • The core issue is the missing tarball artifact
  • Maven multi-module projects often need explicit module targeting for specific artifacts
  • The community edition tarball naming convention is used since this appears to be the community version

• References:

@debasishbsws debasishbsws self-assigned this Dec 23, 2024
…ix binary name for cypher-shell 4. add test

Signed-off-by: Debasish Biswas <debasishbsws.dev@gmail.com>
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Dec 24, 2024
…ctly

Signed-off-by: Debasish Biswas <debasishbsws.dev@gmail.com>
@debasishbsws debasishbsws requested a review from a team December 24, 2024 08:21
@developer-guy
Copy link
Member

kudos @debasishbsws, thanks for fixing the issue!!!!!

@cpanato cpanato merged commit 63556bf into main Dec 24, 2024
14 checks passed
@cpanato cpanato deleted the wolfictl-be92fdf8-fd5f-40a4-a1fe-4f14c0fd8580 branch December 24, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. request-version-update request for a newer version of a package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants