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

chore: remove pull_request_trusted workflow #2024

Merged

Conversation

chmouel
Copy link
Member

@chmouel chmouel commented Mar 25, 2025

  • Removed pull_request_trusted.yaml workflow.
  • Added e2e-label.yaml PipelineRun to label PRs for E2E testing.
  • Updated e2e.yaml workflow to trigger on pull requests with 'e2e' label.
  • Removed pipelinesascode.tekton.dev/task annotation from go.yaml and
    linter.yaml.

The pull_request_trusted workflow has been deprecated and the functionality
has been replaced by e2e.yaml and e2e-label.yaml

This is how it works now:

githug workflow start on pull_request_target we don't want to do this automatically and want to make it approve by trusted users because we have a bunch of secrets there.
github workflow start only when there is a e2e label created or the pull_request has e2e tabel
the addition of label is admin only so i think it should be safe
we use pac to auto label the PR automatically, so whenever there is a non trusted user the /ok-to-test would create it or it will be automatically added on go changes in a PR from a trusted user.

Signed-off-by: Chmouel Boudjnah [email protected]

@Copilot Copilot bot review requested due to automatic review settings March 25, 2025 12:20
@chmouel chmouel force-pushed the adjust-default-sha-and-e2e-condition branch from 7b69b0b to 3217d50 Compare March 25, 2025 12:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the deprecated pull_request_trusted workflow and introduces a new pipeline to trigger the nightly_push_dispatch workflow for running E2E tests on pull requests. Key changes include:

  • Adding the new pipeline (.tekton/run-gha-workflow.yaml) that triggers the nightly workflow.
  • Updating the nightly_push_dispatch workflow input default SHA from "main" to "HEAD" and modifying its test run condition.
  • Removing the pipelinesascode.tekton.dev/task annotation from go and linter pipelines.

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
.tekton/run-gha-workflow.yaml Added a pipeline run spec to trigger the nightly_push_dispatch workflow.
.github/workflows/nightly_push_dispatch.yaml Updated default SHA value and modified the condition for running E2E tests.
.tekton/go.yaml Removed an obsolete pipelinesascode annotation.
.tekton/linter.yaml Removed an obsolete pipelinesascode annotation.
Files not reviewed (1)
  • .github/workflows/pull_request_trusted.yaml: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/nightly_push_dispatch.yaml:104

  • The updated conditional might behave unexpectedly if 'inputs.sha' is empty; consider explicitly checking for a non-empty value (e.g., inputs.sha != '').
if: ${{ github.event_name != 'schedule' || inputs.sha }}

pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/on-event: "pull_request"
pipelinesascode.tekton.dev/on-target-branch: "main"
pipelinesascode.tekton.dev/on-path-change: "[***/*.go, .github/workflows/*l]"
Copy link
Preview

Copilot AI Mar 25, 2025

Choose a reason for hiding this comment

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

The file pattern in 'on-path-change' appears ambiguous; consider refining or clarifying the pattern to ensure it matches the intended files.

Suggested change
pipelinesascode.tekton.dev/on-path-change: "[***/*.go, .github/workflows/*l]"
pipelinesascode.tekton.dev/on-path-change: "[**/*.go, .github/workflows/*.yaml, .github/workflows/*.yml]"

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@chmouel chmouel force-pushed the adjust-default-sha-and-e2e-condition branch from 3217d50 to 6711cd6 Compare March 25, 2025 12:25
@chmouel
Copy link
Member Author

chmouel commented Mar 25, 2025

this works it start the dispatch but it doesn't update the pull request directly need to to the checks tab bummer 🤔

@chmouel chmouel force-pushed the adjust-default-sha-and-e2e-condition branch 4 times, most recently from a6474c9 to 3be738f Compare March 25, 2025 12:50
@chmouel chmouel added the e2e label Mar 25, 2025
@chmouel chmouel force-pushed the adjust-default-sha-and-e2e-condition branch from 183b02a to a7bda44 Compare March 25, 2025 13:06
@chmouel chmouel added e2e and removed e2e labels Mar 25, 2025
@chmouel chmouel force-pushed the adjust-default-sha-and-e2e-condition branch 3 times, most recently from 5c82f9f to 7b4d88d Compare March 25, 2025 13:19
- Removed `pull_request_trusted.yaml` workflow.
- Added `e2e-label.yaml` PipelineRun to label PRs for E2E testing.
- Updated `e2e.yaml` workflow to trigger on pull requests with 'e2e' label.
- Removed `pipelinesascode.tekton.dev/task` annotation from `go.yaml` and
`linter.yaml`.

The `pull_request_trusted` workflow has been deprecated and the functionality
has been replaced by `e2e.yaml` and `e2e-label.yaml`

Signed-off-by: Chmouel Boudjnah <[email protected]>
@chmouel chmouel force-pushed the adjust-default-sha-and-e2e-condition branch from 7b4d88d to 9af7421 Compare March 25, 2025 13:23
@chmouel
Copy link
Member Author

chmouel commented Mar 25, 2025

merging to be able to test it, may the lord of the CI be kind to us.

@chmouel chmouel merged commit 516cd15 into openshift-pipelines:main Mar 25, 2025
2 checks passed
@chmouel chmouel deleted the adjust-default-sha-and-e2e-condition branch March 25, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant