Skip to content

create hermetic builds#185

Merged
openshift-merge-bot[bot] merged 5 commits intorh-ecosystem-edge:mainfrom
rauhersu:main.hermetic
Apr 3, 2025
Merged

create hermetic builds#185
openshift-merge-bot[bot] merged 5 commits intorh-ecosystem-edge:mainfrom
rauhersu:main.hermetic

Conversation

@rauhersu
Copy link
Copy Markdown
Collaborator

@rauhersu rauhersu commented Mar 20, 2025

Summary by CodeRabbit

  • New Features

    • Enhanced pipeline configuration with new parameters for improved network isolation, dependency prefetching, and package management.
    • Introduced RPM dependency management improvements via new configuration and lock mechanisms to ensure consistent build and runtime environments.
  • Documentation

    • Added comprehensive guidelines detailing RPM lock file management and hermetic build workflows.
  • Chores

    • Streamlined the container build process by removing outdated subscription management steps.

@openshift-ci openshift-ci bot requested review from fontivan and tsorya March 20, 2025 15:34
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2025

Walkthrough

This pull request introduces new parameters to two Tekton pipeline configuration files to enforce hermetic builds and prefetch RPM dependencies. It also removes the subscription-manager commands from the Dockerfile. Additionally, new configuration and lockfiles for managing RPM packages during build and runtime have been added in the .konflux/lock-build and .konflux/lock-runtime directories, and a README has been provided to document the updated workflow.

Changes

File(s) Change Summary
.tekton/recert-4-19-pull-request.yaml, .tekton/recert-4-19-push.yaml Added new parameters hermetic, prefetch-input, and dev-package-managers to configure network isolation and dependency prefetching in the pipeline.
.konflux/Dockerfile Removed subscription-manager registration, refresh, and repository enablement commands from both build and runtime stages.
.konflux/README.Konflux.md Added new documentation detailing RPM lock file management and the configuration of hermetic builds using the updated pipeline and RPM lock files.
.konflux/lock-build/rpms.in.yaml, .konflux/lock-build/rpms.lock.yaml Introduced a new build-time configuration file and lockfile defining RPM packages and repository details for the build process.
.konflux/lock-runtime/rpms.in.yaml, .konflux/lock-runtime/rpms.lock.yaml Added new runtime configuration and lockfile for managing RPM dependencies with specified architecture and package details.

Sequence Diagram(s)

sequenceDiagram
    participant Trigger as User Trigger
    participant Pipeline as Tekton Pipeline
    participant Prefetch as Prefetch Task
    participant Build as Build Task

    Trigger->>Pipeline: Initiate Build Process
    Pipeline->>Prefetch: Run 'prefetch-dependencies'\n(using parameters: hermetic, prefetch-input, dev-package-managers)
    Prefetch-->>Pipeline: Return prefetched dependencies
    Pipeline->>Build: Execute build in hermetic mode
    Build-->>Pipeline: Build completed
Loading

Possibly related PRs

  • bootstrap recert over konflux #182 – The changes in this PR introduce the same parameters (hermetic, prefetch-input, and dev-package-managers) in their respective Tekton pipeline configuration files, indicating a direct modification to the same functionality.
  • build under konflux (first approach) #178 – The changes in this PR modify the .tekton/recert-4-19-pull-request.yaml and .tekton/recert-4-19-push.yaml files by adding similar parameters for the Tekton pipeline configuration, specifically the hermetic, prefetch-input, and dev-package-managers parameters.

Suggested labels

lgtm

Suggested reviewers

  • fontivan
  • omertuc

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69aaa53 and cd9a3b5.

📒 Files selected for processing (2)
  • .tekton/recert-4-19-pull-request.yaml (3 hunks)
  • .tekton/recert-4-19-push.yaml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .tekton/recert-4-19-push.yaml
  • .tekton/recert-4-19-pull-request.yaml

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
.konflux/rpms.in.yaml (1)

1-6: Fix duplicate wording in comment.

On line 3 the comment reads “Choosing a rhel9 rpm from from the build stage image we are currently using.” Removing the duplicate “from” will improve clarity.

-     # Choosing a rhel9 rpm from from the build stage image we are currently using.
+     # Choosing a rhel9 rpm from the build stage image we are currently using.
.konflux/README.md (4)

1-7: Improve README introductory clarity.

In the Overview section (line 4), the phrase “hermetic builds ,required by Konflux Conforma” contains an extra comma. Consider revising to:
“… hermetic builds required by Konflux Conforma …”

🧰 Tools
🪛 LanguageTool

[misspelling] ~4-~4: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...in Konflux builds, we need to integrate a RPM lock file management in our workflo...

(EN_A_VS_AN)


10-12: Article correction for lock file generation.

Change “Generate a rpm lock file” to “Generate an rpm lock file” so that the article correctly reflects the vowel sound starting “rpm”.

-### Generate a rpm lock file
+### Generate an rpm lock file
🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ... RPM lock file management ### Generate a rpm lock file We will be using a gener...

(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)


27-28: Verb phrasing correction.

Consider revising “configured to setup a hermetic build workflow” to “configured to set up a hermetic build workflow” for improved readability and correct verb separation.

-configured to setup a hermetic build workflow
+configured to set up a hermetic build workflow
🧰 Tools
🪛 LanguageTool

[grammar] ~27-~27: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...es in .tekton have been configured to setup a hermetic build workflow according to ...

(NOUN_VERB_CONFUSION)


47-48: Temporal phrasing improvement.

Replace “At time of writing” with “At the time of writing” to enhance clarity.

-At time of writing, this is limited to a `rpm.locks.yaml` file present in the project root.
+At the time of writing, this is limited to a `rpm.locks.yaml` file present in the project root.
🧰 Tools
🪛 LanguageTool

[misspelling] ~47-~47: Did you mean “At a time”, “At the time”, or “At times”?
Context: ...ions and generate the updated lockfile. At time of writing, this is limited to a `rpm.l...

(AT_TIME2)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd11399 and b3f70fd.

📒 Files selected for processing (5)
  • .konflux/README.md (1 hunks)
  • .konflux/rpms.in.yaml (1 hunks)
  • .konflux/rpms.lock.yaml (1 hunks)
  • .tekton/recert-4-19-pull-request.yaml (2 hunks)
  • .tekton/recert-4-19-push.yaml (2 hunks)
🧰 Additional context used
🪛 LanguageTool
.konflux/README.md

[misspelling] ~4-~4: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...in Konflux builds, we need to integrate a RPM lock file management in our workflo...

(EN_A_VS_AN)


[uncategorized] ~10-~10: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ... RPM lock file management ### Generate a rpm lock file We will be using a gener...

(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)


[uncategorized] ~16-~16: Loose punctuation mark.
Context: ...th the following fields: 1. repofiles: the .repo file extracted from the runti...

(UNLIKELY_OPENING_PUNCTUATION)


[grammar] ~27-~27: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...es in .tekton have been configured to setup a hermetic build workflow according to ...

(NOUN_VERB_CONFUSION)


[misspelling] ~47-~47: Did you mean “At a time”, “At the time”, or “At times”?
Context: ...ions and generate the updated lockfile. At time of writing, this is limited to a `rpm.l...

(AT_TIME2)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: Red Hat Konflux / recert-4-19-on-pull-request
🔇 Additional comments (7)
.konflux/rpms.in.yaml (2)

7-13: Approve package definitions.

The packages for the build stage (rust-toolset and protobuf-compiler) and runtime stage (openssh-clients) are clearly listed.


14-21: Validate architecture and context settings.

The arches section correctly specifies x86_64, and the context section properly points to the Dockerfile along with the associated image pattern. Ensure that the referenced Dockerfile exists at the specified location.

.konflux/rpms.lock.yaml (1)

1-198: Lockfile structure looks good.

The RPM lock file properly defines the lockfile version, vendor, architectures, and detailed package metadata. Make sure that this file remains auto‐generated from the rpms.in.yaml to avoid manual drift.

.tekton/recert-4-19-pull-request.yaml (2)

32-35:

Details

❓ Verification inconclusive

New pipeline parameters for hermetic builds.

The addition of the hermetic parameter set to "true" and the prefetch-input parameter with the JSON value for RPM dependency prefetching are correctly implemented. Verify that all downstream tasks leverage these parameters as intended.


Please run the above shell script to verify that all downstream tasks leverage the new hermetic and prefetch-input parameters as intended.


🏁 Script executed:

#!/bin/bash
# Search for downstream usage of the new pipeline parameters (excluding the pipeline definition file)
echo "Searching for 'hermetic' references outside of .tekton/recert-4-19-pull-request.yaml..."
rg -n "hermetic" . | grep -v ".tekton/recert-4-19-pull-request.yaml"

echo "Searching for 'prefetch-input' references outside of .tekton/recert-4-19-pull-request.yaml..."
rg -n "prefetch-input" . | grep -v ".tekton/recert-4-19-pull-request.yaml"

Length of output: 655


Action Required: Confirm Downstream Parameter Usage

The new pipeline parameters in .tekton/recert-4-19-pull-request.yaml (lines 32–35)—setting hermetic to "true" and defining the prefetch-input JSON value—appear to be implemented correctly. However, our automated search did not reveal any references to these parameters in downstream tasks. Please manually verify that the downstream tasks are indeed leveraging the hermetic and prefetch-input parameters as intended.


196-198:

Details

❓ Verification inconclusive

Enable development package managers.

The new parameter dev-package-managers with value "true" in the prefetch-dependencies task aligns with the intended configuration for dependency management. Please confirm that tasks expecting this configuration are updated accordingly.


Below is a shell script to search the entire repository for references to "dev-package-managers". This will help us confirm whether tasks expecting this configuration have been updated accordingly:

Once you review the output of this script, please verify that all tasks referencing this parameter align with the intended configuration change made in the prefetch-dependencies task.


🏁 Script executed:

#!/bin/bash
# Search for all occurrences of "dev-package-managers" in the repository.
rg "dev-package-managers" -n .

Length of output: 152


Verify that all tasks correctly use the new configuration for development package managers

For file .tekton/recert-4-19-pull-request.yaml at lines 196–198, the updated snippet now includes:

        value: $(params.prefetch-input)
      - name: dev-package-managers
        value: "true"

This change sets the dev-package-managers parameter to "true" within the prefetch-dependencies task, which aligns with the intended dependency management configuration. However, the search for occurrences of "dev-package-managers" across the repository did not reveal additional references, so please manually verify that any tasks relying on this parameter have been updated accordingly.

.tekton/recert-4-19-push.yaml (2)

29-32: Hermetic build parameters in push configuration.

The hermetic and prefetch-input parameters are consistently defined here to enforce network isolation and prefetch RPM dependencies in push builds.


194-195:

Details

✅ Verification successful

Development package managers parameter added.

The inclusion of dev-package-managers set to "true" in the prefetch-dependencies task is appropriate. Verify compatibility with the existing dependency management framework.


Dependency Management Parameter Verified

The inclusion of the dev-package-managers parameter (set to "true") in the prefetch-dependencies task in .tekton/recert-4-19-push.yaml (lines 194–195) appears appropriate. Please ensure that integration tests confirm its compatibility with our existing dependency management framework, and that no legacy configurations are adversely affected.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (6)
.konflux/rpms.in.yaml (1)

1-18: Fix YAML Indentation and Newline Issues
There are YAML lint warnings that need addressing:

  • Indentation:
    • The list item on line 5 is indented with 5 spaces but should use 4 spaces relative to its parent key.
    • The context block (lines 15–18) is over-indented (4 spaces) and should be reduced to 2 spaces relative to the root key.
  • Newline:
    • The file lacks a newline at the end (line 18), which is required.

A suggested diff adjustment:

 contentOrigin:
   repofiles:
-     # Choosing a rhel9 rpm from from the build stage image we are currently using.
-     # See also the 'imagePattern' matching that below.
-     - ./redhat.repo
+  # Choosing a rhel9 rpm from the build stage image we are currently using.
+  # See also the 'imagePattern' matching that below.
+  - ./redhat.repo

 packages:
   # build stage
@@
-context:
-    containerfile:
-      file: ./Dockerfile
-      stageName: build-image
+context:
+  containerfile:
+    file: ./Dockerfile
+    stageName: build-image

Then, add a newline at the end of the file.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 5-5: wrong indentation: expected 4 but found 5

(indentation)


[warning] 16-16: wrong indentation: expected 2 but found 4

(indentation)


[error] 18-18: no new line character at the end of file

(new-line-at-end-of-file)

.konflux/README.Konflux.md (5)

4-4: Grammar Correction: Use "an" Instead of "a"
In the sentence “...we need to integrate a RPM lock file management in our workflow...”, change a RPM to an RPM to follow proper grammar rules.

🧰 Tools
🪛 LanguageTool

[misspelling] ~4-~4: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...in Konflux builds, we need to integrate a RPM lock file management in our workflo...

(EN_A_VS_AN)


10-10: Grammar Correction: Update Indefinite Article
Change the header “Generate a rpm lock file” to “Generate an rpm lock file” for correctness.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ... RPM lock file management ### Generate a rpm lock file We will be using a gener...

(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)


16-16: Punctuation Suggestion
Review the punctuation in the list item describing repofiles (line 16). A slight adjustment for clarity—for example, adding a comma if needed—would improve readability.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~16-~16: Loose punctuation mark.
Context: ...th the following fields: 1. repofiles: the .repo file extracted from the runti...

(UNLIKELY_OPENING_PUNCTUATION)


27-27: Verb Phrase Correction: Use "set up" Instead of "setup"
In the phrase “configured to setup a hermetic build workflow”, change setup to set up since the verb phrase requires a space.

🧰 Tools
🪛 LanguageTool

[grammar] ~27-~27: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...es in .tekton have been configured to setup a hermetic build workflow according to ...

(NOUN_VERB_CONFUSION)


47-47: Clarify Timeliness: Add Definite Article
Replace “At time of writing” with “At the time of writing” to improve clarity.

🧰 Tools
🪛 LanguageTool

[misspelling] ~47-~47: Did you mean “At a time”, “At the time”, or “At times”?
Context: ...ions and generate the updated lockfile. At time of writing, this is limited to a `rpm.l...

(AT_TIME2)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 00e7a07 and cdc329a.

📒 Files selected for processing (6)
  • .konflux/Dockerfile (1 hunks)
  • .konflux/README.Konflux.md (1 hunks)
  • .konflux/rpms.in.yaml (1 hunks)
  • .konflux/rpms.lock.yaml (1 hunks)
  • .tekton/recert-4-19-pull-request.yaml (2 hunks)
  • .tekton/recert-4-19-push.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .konflux/rpms.lock.yaml
🧰 Additional context used
🪛 Hadolint (2.12.0)
.konflux/Dockerfile

[error] 5-5: Use absolute WORKDIR

(DL3000)

🪛 LanguageTool
.konflux/README.Konflux.md

[misspelling] ~4-~4: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...in Konflux builds, we need to integrate a RPM lock file management in our workflo...

(EN_A_VS_AN)


[uncategorized] ~10-~10: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ... RPM lock file management ### Generate a rpm lock file We will be using a gener...

(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)


[uncategorized] ~16-~16: Loose punctuation mark.
Context: ...th the following fields: 1. repofiles: the .repo file extracted from the runti...

(UNLIKELY_OPENING_PUNCTUATION)


[grammar] ~27-~27: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...es in .tekton have been configured to setup a hermetic build workflow according to ...

(NOUN_VERB_CONFUSION)


[misspelling] ~47-~47: Did you mean “At a time”, “At the time”, or “At times”?
Context: ...ions and generate the updated lockfile. At time of writing, this is limited to a `rpm.l...

(AT_TIME2)

🪛 YAMLlint (1.35.1)
.konflux/rpms.in.yaml

[warning] 5-5: wrong indentation: expected 4 but found 5

(indentation)


[warning] 16-16: wrong indentation: expected 2 but found 4

(indentation)


[error] 18-18: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build
  • GitHub Check: Red Hat Konflux / recert-4-19-on-pull-request
🔇 Additional comments (3)
.tekton/recert-4-19-pull-request.yaml (1)

32-35: Add Hermetic Build Parameters
The new hermetic and prefetch-input parameters are correctly added to enforce network isolation and enable RPM dependency prefetching. Please double-check that downstream tasks and pipelines expect these values and that the quoting is consistent.

.tekton/recert-4-19-push.yaml (2)

29-32: Ensure Consistent Pipeline Parameters for Hermetic Builds
The new hermetic and prefetch-input pipeline parameters have been added correctly. Verify that these values are consistently used across the pipeline and match the configuration in the pull request YAML.


194-195: Enable Dev Package Management
The addition of the dev-package-managers parameter in the prefetch-dependencies task helps support dependency management during hermetic builds. This change looks good; please confirm that the downstream tasks use this parameter as expected.


# build stage
FROM registry.redhat.io/rhel9-4-els/rhel:9.4-1044 AS build-image
WORKDIR app
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use Absolute Paths for WORKDIR
Hadolint recommends the use of absolute paths for the WORKDIR directive. Please update both instances (in the build and runtime stages) as shown below:

-WORKDIR app
+WORKDIR /app

This change enhances clarity and complies with best practices.

Also applies to: 21-21

🧰 Tools
🪛 Hadolint (2.12.0)

[error] 5-5: Use absolute WORKDIR

(DL3000)

@rauhersu
Copy link
Copy Markdown
Collaborator Author

I will change the hermetic config once again.

/hold

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.konflux/lock-build/rpms.in.yaml (1)

1-16: Fix Indentation and End-of-File Newline

Static analysis flags indicate indentation issues:

  • Line 4: Expected 4 spaces but found 5.
  • Line 14: Expected 2 spaces but found 4.

Additionally, there is no newline at the end of the file. Please adjust the indentation to follow YAML best practices and add a final newline. For example:

-contentOrigin:
-  repofiles:
-     # rhel9 rpm repos
-     - ./redhat.repo
+contentOrigin:
+  repofiles:
+    # rhel9 rpm repos
+    - ./redhat.repo
-context:
-    containerfile:
-      file: ../Dockerfile
-      stageName: build-image
+context:
+  containerfile:
+    file: ../Dockerfile
+    stageName: build-image

Finally, ensure a newline is appended at the end of the file.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 4-4: wrong indentation: expected 4 but found 5

(indentation)


[warning] 14-14: wrong indentation: expected 2 but found 4

(indentation)


[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cdc329a and 0cdd627.

📒 Files selected for processing (6)
  • .konflux/lock-build/rpms.in.yaml (1 hunks)
  • .konflux/lock-build/rpms.lock.yaml (1 hunks)
  • .konflux/lock-runtime/rpms.in.yaml (1 hunks)
  • .konflux/lock-runtime/rpms.lock.yaml (1 hunks)
  • .tekton/recert-4-19-pull-request.yaml (2 hunks)
  • .tekton/recert-4-19-push.yaml (2 hunks)
✅ Files skipped from review due to trivial changes (3)
  • .konflux/lock-build/rpms.lock.yaml
  • .konflux/lock-runtime/rpms.in.yaml
  • .konflux/lock-runtime/rpms.lock.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.konflux/lock-build/rpms.in.yaml

[warning] 4-4: wrong indentation: expected 4 but found 5

(indentation)


[warning] 14-14: wrong indentation: expected 2 but found 4

(indentation)


[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Red Hat Konflux / recert-4-19-on-pull-request
🔇 Additional comments (4)
.tekton/recert-4-19-pull-request.yaml (2)

32-35: New Parameters for Hermetic Build and Prefetch Input

The addition of the hermetic parameter (set as "true") and the JSON string for prefetch-input successfully supports the goal of enforcing hermetic builds and prefetching RPM dependencies. These values will override the defaults provided in the pipeline spec. Please verify that downstream tasks correctly consume these parameters.


197-198: Addition of dev-package-managers Parameter

The new dev-package-managers parameter set to "true" within the prefetch-dependencies task is a clear and consistent enhancement to manage build-time dependency resolution. Confirm that all tasks relying on dependency configuration are updated accordingly.

.tekton/recert-4-19-push.yaml (2)

29-32: New Pipeline Parameters for Hermetic Build in Push Pipeline

The parameters hermetic and prefetch-input are newly introduced with the expected values ("true" and the appropriate JSON string, respectively). This mirrors the changes made in the pull-request pipeline and upholds a consistent approach. Please double-check that these parameters are properly propagated to all affected tasks.


194-195: Inclusion of dev-package-managers Parameter

The new dev-package-managers parameter (with value "true") in the prefetch-dependencies task is correctly integrated to improve dependency handling. Ensure that any downstream processing that relies on this parameter is consistent with this change.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (7)
.konflux/lock-build/rpms.in.yaml (3)

1-5: Indentation Issue in the contentOrigin Block

Static analysis indicates an indentation anomaly at line 4. The list item (- ./redhat.repo) is indented more than expected (expected 4 spaces but found 5). Please adjust the indentation to conform with YAML standards to avoid linting warnings.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 4-4: wrong indentation: expected 4 but found 5

(indentation)


13-16: Indentation Issue in the context Block

The containerfile key appears to be over-indented (expected 2 spaces but found 4). Adjust the indentation of the context block for consistency and compliance with YAML linting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 14-14: wrong indentation: expected 2 but found 4

(indentation)


[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)


16-16: Missing Newline at End of File

A newline character is missing at the end of the file, which is a common standard for text files. Adding a newline will help prevent potential issues in certain environments and tools.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)

.konflux/README.Konflux.md (4)

1-4: Improve Article Usage & Punctuation in Overview

On line 4, consider revising the sentence for clarity and grammatical accuracy. For example, update:

"When installing external software via RPMs in Konflux builds, we need to integrate a RPM lock file management in our workflow: the primary goal is to ensure that hermetic builds ,required by Konflux Conforma, can pre-fetch RPM dependencies before building the Docker image."

to something like:

"When installing external software via RPMs in Konflux builds, we need to integrate an RPM lock file management system into our workflow: the primary goal is to ensure that hermetic builds, required by Konflux Conforma, can pre-fetch RPM dependencies before building the Docker image."

This small change addresses the extra space before the comma and improves article consistency.

🧰 Tools
🪛 LanguageTool

[misspelling] ~4-~4: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...in Konflux builds, we need to integrate a RPM lock file management in our workflo...

(EN_A_VS_AN)


10-11: Header Title Correction

The header "Generate a rpm lock file" would be clearer as "Generate an RPM lock file" to conform with proper article usage and capitalization.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~10-~10: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ... RPM lock file management ### Generate a rpm lock file We will be using a gener...

(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)


29-29: Verb Form Correction

In the sentence regarding Tekton configuration, change "configured to setup a hermetic build workflow" to "configured to set up a hermetic build workflow" to correctly use the verb phrase.

🧰 Tools
🪛 LanguageTool

[grammar] ~29-~29: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...es in .tekton have been configured to setup a hermetic build workflow according to ...

(NOUN_VERB_CONFUSION)


49-49: Temporal Expression Enhancement

Consider revising "At time of writing" to "At the time of writing" or simply "Currently" for improved readability.

🧰 Tools
🪛 LanguageTool

[misspelling] ~49-~49: Did you mean “At a time”, “At the time”, or “At times”?
Context: ...ions and generate the updated lockfile. At time of writing, this is limited to a `rpm.l...

(AT_TIME2)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cdd627 and d2e89e4.

📒 Files selected for processing (8)
  • .konflux/Dockerfile (1 hunks)
  • .konflux/README.Konflux.md (1 hunks)
  • .konflux/lock-build/rpms.in.yaml (1 hunks)
  • .konflux/lock-build/rpms.lock.yaml (1 hunks)
  • .konflux/lock-runtime/rpms.in.yaml (1 hunks)
  • .konflux/lock-runtime/rpms.lock.yaml (1 hunks)
  • .tekton/recert-4-19-pull-request.yaml (2 hunks)
  • .tekton/recert-4-19-push.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .konflux/lock-runtime/rpms.in.yaml
  • .konflux/lock-runtime/rpms.lock.yaml
  • .tekton/recert-4-19-push.yaml
  • .tekton/recert-4-19-pull-request.yaml
🧰 Additional context used
🪛 Hadolint (2.12.0)
.konflux/Dockerfile

[error] 5-5: Use absolute WORKDIR

(DL3000)

🪛 LanguageTool
.konflux/README.Konflux.md

[misspelling] ~4-~4: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...in Konflux builds, we need to integrate a RPM lock file management in our workflo...

(EN_A_VS_AN)


[uncategorized] ~10-~10: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ... RPM lock file management ### Generate a rpm lock file We will be using a gener...

(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)


[uncategorized] ~18-~18: Loose punctuation mark.
Context: ...th the following fields: 1. repofiles: the .repo file extracted from the runti...

(UNLIKELY_OPENING_PUNCTUATION)


[grammar] ~29-~29: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...es in .tekton have been configured to setup a hermetic build workflow according to ...

(NOUN_VERB_CONFUSION)


[misspelling] ~49-~49: Did you mean “At a time”, “At the time”, or “At times”?
Context: ...ions and generate the updated lockfile. At time of writing, this is limited to a `rpm.l...

(AT_TIME2)

🪛 YAMLlint (1.35.1)
.konflux/lock-build/rpms.in.yaml

[warning] 4-4: wrong indentation: expected 4 but found 5

(indentation)


[warning] 14-14: wrong indentation: expected 2 but found 4

(indentation)


[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Red Hat Konflux / recert-4-19-on-pull-request
🔇 Additional comments (8)
.konflux/lock-build/rpms.lock.yaml (1)

1-170: Overall Schema & Structure Validation

The RPM lock file for the build configuration is well structured and clearly defines the expected attributes (e.g., lockfileVersion, arches, packages). The package entries include comprehensive metadata (URL, repoid, size, checksum, name, evr, sourcerpm), which will help ensure reproducible and verifiable builds.

Please ensure that any future modifications to the lockfile remain consistent with the deployment schema and that any internal tooling validating these files is updated accordingly.

.konflux/lock-build/rpms.in.yaml (1)

1-16: Overall File Review

The configuration in this file is clear and directly supports the hermetic build process by listing the required packages and specifying the build context. Once the indentation and EOF newline issues are fixed, the file should be ready.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 4-4: wrong indentation: expected 4 but found 5

(indentation)


[warning] 14-14: wrong indentation: expected 2 but found 4

(indentation)


[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)

.konflux/Dockerfile (5)

1-4: Subscription-Manager Commands Removal

The removal of subscription-manager commands in this Dockerfile aligns with the goal of creating a hermetic build environment. The current instructions now focus on installing the essential packages and cleaning up appropriately.


5-5: Use Absolute Path for WORKDIR in Build Stage

For clarity and to adhere to best practices (as noted in previous reviews), please change the WORKDIR from a relative path to an absolute one. For example:

- WORKDIR app
+ WORKDIR /app
🧰 Tools
🪛 Hadolint (2.12.0)

[error] 5-5: Use absolute WORKDIR

(DL3000)


8-10: Efficient Package Installation Command

The RUN command in the build stage is succinct and cleans up after installation. No changes are needed here.


21-21: Use Absolute Path for WORKDIR in Runtime Stage

Similarly, in the runtime stage, update the WORKDIR to an absolute path for consistency:

- WORKDIR app
+ WORKDIR /app
🧰 Tools
🪛 Hadolint (2.12.0)

[error] 21-21: Use absolute WORKDIR

(DL3000)


15-24: Runtime Stage Cleanliness

The runtime stage focuses on installing minimal packages (such as openssh-clients) and cleaning up after installation. This aligns well with the hermetic build philosophy.

🧰 Tools
🪛 Hadolint (2.12.0)

[error] 21-21: Use absolute WORKDIR

(DL3000)

.konflux/README.Konflux.md (1)

1-50: Overall README Evaluation

The README provides comprehensive documentation covering RPM lock file management and the hermetic build workflow. After incorporating the minor grammatical and stylistic corrections suggested above, the document will effectively guide developers through the updated process.

🧰 Tools
🪛 LanguageTool

[misspelling] ~4-~4: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...in Konflux builds, we need to integrate a RPM lock file management in our workflo...

(EN_A_VS_AN)


[uncategorized] ~10-~10: Use the indefinite article “an” before nouns that start with a vowel sound.
Context: ... RPM lock file management ### Generate a rpm lock file We will be using a gener...

(AI_EN_LECTOR_REPLACEMENT_DETERMINER_A_AN)


[uncategorized] ~18-~18: Loose punctuation mark.
Context: ...th the following fields: 1. repofiles: the .repo file extracted from the runti...

(UNLIKELY_OPENING_PUNCTUATION)


[grammar] ~29-~29: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...es in .tekton have been configured to setup a hermetic build workflow according to ...

(NOUN_VERB_CONFUSION)


[misspelling] ~49-~49: Did you mean “At a time”, “At the time”, or “At times”?
Context: ...ions and generate the updated lockfile. At time of writing, this is limited to a `rpm.l...

(AT_TIME2)

@rauhersu
Copy link
Copy Markdown
Collaborator Author

/unhold

Blocked by a bug in the coverity task: konflux-ci/build-definitions#2096
Context: https://redhat-internal.slack.com/archives/C04PZ7H0VA8/p1741795054227499

@rauhersu
Copy link
Copy Markdown
Collaborator Author

rauhersu commented Apr 2, 2025

/retest

@fontivan
Copy link
Copy Markdown
Member

fontivan commented Apr 3, 2025

/lgtm
/approve

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fontivan, rauhersu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 79eecb2 into rh-ecosystem-edge:main Apr 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants