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

apache-nifi/2.1.0 package update #38283

Merged
merged 3 commits into from
Dec 24, 2024

Conversation

octo-sts[bot]
Copy link
Contributor

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

Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Dec 23, 2024
Copy link
Contributor Author

octo-sts bot commented Dec 23, 2024

Gen AI suggestions to solve the build error:

• Detected Error: "Expected commit dbf663c6d1e46917634321e12db852df4c223129 for rel/nifi-2.1.0, found f3af2394f90f2326a3ddacf1bf3a2f3160fbe6a6"

• Error Category: Version/Configuration

• Failure Point: Git checkout step in the pipeline

• Root Cause Analysis: The expected commit hash in the melange YAML doesn't match the actual commit hash for the tag rel/nifi-2.1.0. This indicates the upstream repository has either been updated or the commit hash in the configuration is incorrect.

• Suggested Fix: Update the expected-commit hash in the git-checkout step to match the current commit hash:

  - uses: git-checkout
    with:
      repository: https://github.com/apache/nifi
      tag: rel/nifi-2.1.0
      expected-commit: f3af2394f90f2326a3ddacf1bf3a2f3160fbe6a6

• Explanation: The build system uses commit hash verification as a security measure to ensure the exact version of code being built. The current failure occurs because the actual commit hash (f3af2394f90f2326a3ddacf1bf3a2f3160fbe6a6) for the tag doesn't match what was specified in the configuration (dbf663c6d1e46917634321e12db852df4c223129). Updating to the correct hash will allow the build to proceed.

• Additional Notes:

  • This type of mismatch commonly occurs when:
    1. The upstream repository has modified the tag
    2. The original hash was incorrectly copied
    3. The repository has been rebased
  • It's good practice to verify the commit hash matches the tag using:
    git ls-remote https://github.com/apache/nifi refs/tags/rel/nifi-2.1.0

• References:

Copy link
Contributor Author

octo-sts bot commented Dec 24, 2024

Gen AI suggestions to solve the build error:

• Detected Error: "patching file pom.xml
Hunk #1 FAILED at 152.
1 out of 1 hunk FAILED -- saving rejects to file pom.xml.rej"

• Error Category: Configuration

• Failure Point: The patch step attempting to apply upgrade-netty.4.version.patch to pom.xml

• Root Cause Analysis: The patch is failing to apply cleanly to the pom.xml file, likely because the context lines in the patch file don't match the target file exactly. This often happens when the base version of the file has changed from when the patch was created.

• Suggested Fix:

  1. Generate a new patch file against the current version:
# First, check out the correct version
git checkout rel/nifi-2.1.0

# Make the netty version changes manually
# Then create a new patch
git diff > upgrade-netty.4.version.patch
  1. Alternatively, modify the pom.xml directly in the pipeline:
pipeline:
  - uses: git-checkout
    with:
      repository: https://github.com/apache/nifi
      tag: rel/nifi-${{package.version}}
      expected-commit: f3af2394f90f2326a3ddacf1bf3a2f3160fbe6a6

  - runs: |
      # Update netty version directly
      sed -i 's/<netty.4.version>.*<\/netty.4.version>/<netty.4.version>4.1.100.Final<\/netty.4.version>/g' pom.xml

  - uses: maven/pombump

• Explanation: The patch is failing because the context lines around line 152 in pom.xml don't match exactly. This is common when the base file has been modified between when the patch was created and when it's being applied. Creating a new patch against the current version or directly modifying the file will resolve the issue.

• Additional Notes:

  • Consider using sed or xmlstarlet for direct XML modifications if the changes are simple
  • Verify the netty version being upgraded to is compatible with NiFi 2.1.0
  • The patch method is more maintainable for complex changes, while direct file modification is simpler for single-line changes

• References:

@ajayk ajayk force-pushed the wolfictl-3e6f1ed0-fc03-46d6-83aa-5b1896e45b5f branch from b54ad30 to 88760b7 Compare December 24, 2024 00:32
Copy link
Contributor Author

octo-sts bot commented Dec 24, 2024

Gen AI suggestions to solve the build error:

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

• Detected Error: While there isn't an explicit error message, the build appears to stop after the git checkout step without proceeding further, suggesting an issue with the repository checkout or tag.

• Error Category: Version/Configuration

• Failure Point: Git checkout step with tag 'rel/nifi-2.1.0'

• Root Cause Analysis: The build is failing because the tag format in the git-checkout step doesn't match Apache NiFi's actual release tag format. Apache NiFi uses tags in the format 'rel/nifi-2.1.0' but there might be a mismatch with the actual tag.

• Suggested Fix:

  1. Verify the exact tag format in the Apache NiFi repository:
  - uses: git-checkout
    with:
      repository: https://github.com/apache/nifi
      tag: nifi-${{package.version}}  # Remove 'rel/' prefix
      expected-commit: dbf663c6d1e46917634321e12db852df4c223129
  1. Update the update section to match:
update:
  enabled: true
  ignore-regex-patterns:
    - -RC
    - -M
  github:
    identifier: apache/nifi
    use-tag: true
    strip-prefix: nifi-  # Remove 'rel/' from strip-prefix
    tag-filter: nifi-    # Update tag filter

• Explanation: Apache NiFi's release tags sometimes vary in format. The current configuration expects 'rel/nifi-2.1.0' but the repository might be using a different format. By adjusting the tag format to match the repository's actual tags, the checkout should succeed.

• Additional Notes:

  • Always verify tag format directly in the upstream repository
  • Consider adding error handling for the git checkout step
  • The expected-commit hash should be verified against the actual tag

• References:

After applying these changes, the build should proceed past the git checkout step. If you still encounter issues, checking the actual tag format in the repository would be the next debugging step.

@octo-sts octo-sts bot added bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. manual/review-needed labels Dec 24, 2024
@rawlingsj rawlingsj merged commit 75136ca into main Dec 24, 2024
14 checks passed
@rawlingsj rawlingsj deleted the wolfictl-3e6f1ed0-fc03-46d6-83aa-5b1896e45b5f branch December 24, 2024 11:18
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. manual/review-needed request-version-update request for a newer version of a package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants