Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@booxter
Copy link
Contributor

@booxter booxter commented Apr 30, 2025

This allows to test workflow changes to these jobs before merging them.

Signed-off-by: Ihar Hrachyshka [email protected]

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Functional tests have been added, if necessary.
  • E2E Workflow tests have been added, if necessary.

@mergify mergify bot added CI/CD Affects CI/CD configuration ci-failure PR has at least one CI failure labels Apr 30, 2025
@booxter
Copy link
Contributor Author

booxter commented Apr 30, 2025

src.custom_exceptions.ExposedSecretsError: Detected one or more exposed secrets. Please review the findings below, and if you feel they have been made in error, please file a GitHub issue and link to this job URL. Findings: {'filename': '/home/runner/work/instructlab/instructlab/pull-request-changes/.github/workflows/e2e-nvidia-t4-x1.yml', 'job_name': 'e2e-small-test', 'exposed_secrets': {'GH_TOKEN': '${{ secrets.GITHUB_TOKEN }}'}}

WAT? I just copied from other jobs verbatim. Bug in the action? @courtneypacheco @ktdreyer advice?

@booxter
Copy link
Contributor Author

booxter commented Apr 30, 2025

@ktdreyer ignoring the security check, any idea how this can be tested, considering that there's no Run workflow button for these jobs? (because the workflow_dispatch setting is not added to them)

@booxter
Copy link
Contributor Author

booxter commented Apr 30, 2025

I believe it's a mistake in the ci action that it targets workflows of pull_request_target type, fix here: instructlab/ci-actions#14

@booxter
Copy link
Contributor Author

booxter commented May 1, 2025

One idea to make landing this less risky is:

  • first, merge just bare "workflow_dispatch" addition (without inputs) - this should be relatively safe.
  • then on second stage, we can add inputs - at this point we should be able to test pre-merge with the Run button.

@ktdreyer @courtneypacheco thoughts?

@ktdreyer ktdreyer self-requested a review May 2, 2025 18:51
Copy link
Contributor

@ktdreyer ktdreyer left a comment

Choose a reason for hiding this comment

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

This looks ok to me. You are right, you're just copying logic from the other jobs.

I think we should discuss the overall structure of how we do this pattern and ideas for hardening and optimizing this, but that is out of scope for this PR.

@mergify mergify bot added the one-approval PR has one approval from a maintainer label May 2, 2025
@mergify
Copy link
Contributor

mergify bot commented May 6, 2025

This pull request has merge conflicts that must be resolved before it can be merged. @booxter please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase This Pull Request needs to be rebased label May 6, 2025
@booxter booxter force-pushed the ihrachyshka-workflow_dispatch branch from db9bd6f to 8ec1e5c Compare May 6, 2025 16:15
@mergify mergify bot removed the needs-rebase This Pull Request needs to be rebased label May 6, 2025
@booxter
Copy link
Contributor Author

booxter commented May 6, 2025

Skipping yamllint long lines failure here: #3360 since I don't think we should split the lines for these files. The long lines are for gh comment steps.

@booxter
Copy link
Contributor Author

booxter commented May 6, 2025

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented May 6, 2025

rebase

✅ Branch has been successfully rebased

@booxter booxter force-pushed the ihrachyshka-workflow_dispatch branch from 8ec1e5c to 0384106 Compare May 6, 2025 21:20
@booxter
Copy link
Contributor Author

booxter commented May 6, 2025

To pass gate, we'll need to disable enforcement of security-check, as I explain in: #3353

@booxter booxter marked this pull request as ready for review May 6, 2025 21:21
@booxter booxter force-pushed the ihrachyshka-workflow_dispatch branch from 0384106 to ba34e6c Compare May 6, 2025 21:24
@booxter booxter marked this pull request as draft May 6, 2025 21:26
@booxter
Copy link
Contributor Author

booxter commented May 6, 2025

Testing new functionality on this PR: #3101

@booxter booxter force-pushed the ihrachyshka-workflow_dispatch branch from ba34e6c to a25ac31 Compare May 6, 2025 22:18
@mergify mergify bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels May 6, 2025
@booxter booxter force-pushed the ihrachyshka-workflow_dispatch branch from a25ac31 to e8e444b Compare May 6, 2025 22:30
@mergify mergify bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels May 6, 2025
@booxter
Copy link
Contributor Author

booxter commented May 7, 2025

So it's impossible to use gh without a token in CI, even for checkouts (I was hoping we could stay token-less by removing Slack / Discord / PR commenting functionality). We can use a regular checkout action to access a particular PR, probably. But this escalates into a territory where I'd like DevOps folks to step in and advise.

tl;dr we need a way to Run workflow for small and medium jobs that are ALSO triggered on pull_request_target - which makes security-lint job fail if we try to pull a secret like GH_TOKEN. This is not a problem for large jobs that are not pull_request_target and hence the linter rule is not executed on these other workflow files.

@booxter
Copy link
Contributor Author

booxter commented May 31, 2025

I don't have capacity to complete it.

@booxter booxter closed this May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Affects CI/CD configuration ci-failure PR has at least one CI failure one-approval PR has one approval from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants