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

Restricted AArch64 CI to relevant changes #2259

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Conversation

vpirogov
Copy link
Member

There's no need to run AArch64 CI on changes that are unlikely to affect this platform.

@vpirogov vpirogov requested a review from a team as a code owner December 12, 2024 23:22
@github-actions github-actions bot added the devops Github automation label Dec 12, 2024
@vpirogov vpirogov marked this pull request as draft December 12, 2024 23:23
@vpirogov
Copy link
Member Author

The issue with approach taken in this PR is that Github still considers AArch64 CI checks required and prevents PR from being promoted.

@vpirogov
Copy link
Member Author

@theComputeKid, any ideas here?

@theComputeKid
Copy link
Member

One solution (but not ideal) is that we add a step in the AArch64 pipeline to read the label and then make a decision based on that to quit successfully early.

Drawbacks:

  1. We will still spin up an instance for a few seconds
  2. It will still book a slot in the Q
  3. It will label the AArch64 as passed even though it was skipped

Advantages:

  1. We will only spin up an instance for a few seconds instead of the whole run.

I'm working on a PR to reduce the configs AArch64, should have that out shortly.

@mgouicem
Copy link
Contributor

Stackoverflow suggests to create an action with same name but with opposite condition that would always run successfully (see here)

@vpirogov
Copy link
Member Author

vpirogov commented Dec 13, 2024

Stackoverflow suggests to create an action with same name but with opposite condition that would always run successfully (see here)

This approach is very limited as 'opposite condition' cannot always be described using trigger path syntax. Conditions suggested in the answer with path: xxx and path-ignore: xxx are not mutually exclusive. A PR touching files matching xxx and not matching xxx will trigger both workflows. This is discussed further down the thread.

@vpirogov vpirogov force-pushed the vpirogov/ci-restrict branch from 74a4569 to 571c69f Compare December 18, 2024 01:49
@vpirogov vpirogov changed the title github: workflows: excluded cpu/x64 and gpu from AArch64 CI trigger Restricted AArch64 CI to relevant changes Dec 18, 2024
@vpirogov
Copy link
Member Author

I would suggest that at this point we make sure that AArch64 CI runs only for relevant changes and figure out how to make it required later. Github developers are aware of our pain.

We are taking the same approach for x64 CI: #2281. I expect codeowners (i.e. people allowed to merge PRs) would use CI as a tool to prevent breaking changes.

@vpirogov vpirogov marked this pull request as ready for review December 18, 2024 01:55
@vpirogov vpirogov force-pushed the vpirogov/ci-restrict branch 9 times, most recently from 430aba3 to 3026439 Compare December 18, 2024 05:17
@theComputeKid
Copy link
Member

Does this mean that the CI will not run if not needed, but then also the "required check" will not be satisfied and an override will be needed?

@theComputeKid
Copy link
Member

theComputeKid commented Dec 18, 2024

I was playing around with a script that would, in the first step:

  1. Detect if CI is needed
  2. Export an environment variable that propagates that information

Then each further step would skip successfully if that env variable is present. It is over-engineering for the problem but it would get the job done gracefully.

This however still boots up an AArch64 runner, which we want to avoid.

@vpirogov
Copy link
Member Author

Does this mean that the CI will not run if not needed, but then also the "required check" will not be satisfied and an override will be needed?

Yes, required check will not work with this setup. I believe from developer quality of life perspective it's more important to get this part completed than figuring out how to enable required checks. For example currently broken AArch64 CI would block all PRs from being merged to the repo.

Copy link
Member

@theComputeKid theComputeKid left a comment

Choose a reason for hiding this comment

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

Whoever merges now needs to check whether a failure in CI is a genuine failure, or caused by skipping CI.

@vpirogov vpirogov force-pushed the vpirogov/ci-restrict branch from 3026439 to ec27e38 Compare December 18, 2024 22:29
@vpirogov vpirogov force-pushed the vpirogov/ci-restrict branch from ec27e38 to 4192f63 Compare December 18, 2024 22:43
@vpirogov
Copy link
Member Author

Whoever merges now needs to check whether a failure in CI is a genuine failure, or caused by skipping CI.

Whoever merges a PR needs to check whether it introduces failures in CI. Skipping CI will not flag any issues.

@vpirogov vpirogov merged commit bd3a386 into main Dec 19, 2024
5 of 17 checks passed
@vpirogov vpirogov deleted the vpirogov/ci-restrict branch December 19, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops Github automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants