Skip to content

fix: ci mod updates - #734

Open
anithapriyanatarajan wants to merge 1 commit into
openshift-pipelines:masterfrom
anithapriyanatarajan:fix-ci
Open

fix: ci mod updates#734
anithapriyanatarajan wants to merge 1 commit into
openshift-pipelines:masterfrom
anithapriyanatarajan:fix-ci

Conversation

@anithapriyanatarajan

Copy link
Copy Markdown
Member

Update to fix the timeout and ci issue

Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses continuous integration issues and potential timeouts by updating the trigger conditions for the CI image build pipeline. By expanding the trigger to include changes in the go.mod file, the system ensures that the CI environment consistently reflects the project's Go dependencies, which is crucial for preventing build failures and maintaining a stable development workflow.

Highlights

  • CI Trigger Logic: The CI image build pipeline will now be triggered not only when Dockerfile.CI is modified but also when the go.mod file changes. This ensures that the CI image is rebuilt if Go module dependencies are updated.
Changelog
  • .tekton/create-ci-image-pipelinerun.yaml
    • Modified the on-cel-expression annotation to include go.mod file changes as a trigger for the CI image pipeline.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Tekton pipeline trigger to rebuild the CI image when go.mod is modified. This is a good change, as it ensures the CI environment has the correct dependencies. However, the trigger should also include changes to go.sum, as this file is also critical for defining the exact versions of dependencies and can change even when go.mod does not. I've added a suggestion to include go.sum in the trigger condition to make the CI process more robust.

annotations:
pipelinesascode.tekton.dev/on-cel-expression: |
"Dockerfile.CI".pathChanged() && ( event == "push" || event == "pull_request" )
("Dockerfile.CI".pathChanged() || "go.mod".pathChanged()) && ( event == "push" || event == "pull_request" )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The trigger condition should also include changes to go.sum. The Dockerfile.CI uses both go.mod and go.sum to download Go dependencies. There are scenarios, like updating transitive dependencies, where only go.sum changes. Without triggering a rebuild in this case, the CI could run with stale dependencies from a cached image layer.

      ("Dockerfile.CI".pathChanged() || "go.mod".pathChanged() || "go.sum".pathChanged()) && ( event == "push" || event == "pull_request" )

@anithapriyanatarajan

Copy link
Copy Markdown
Member Author

/retest

@anithapriyanatarajan

Copy link
Copy Markdown
Member Author

@srivickynesh everytime CI is failing for PVC or cluster availability. This is not at all scaling. To avoid the release test failures we need to publish the latest images to the openshift-pipeline/ci repo on every PR merge. Do you have any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant