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(ci suitespec): default to diffing against base branch if exactly 30 changed files returned #6649

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

Yun-Kim
Copy link
Contributor

@Yun-Kim Yun-Kim commented Aug 11, 2023

This is a cherry-pick of test commit c5c7d0a.

We currently use the Github REST API to see all changed files in a PR, and default to using a git diff against a base commit if that fails. However, the REST API call will return at most 30 changed files which are used to compute which test suites to run, so large PRs (potentially with many lockfiles changed) will potentially not trigger test suites.

This PR adds a workaround where if we get exactly 30 changed files in the Github REST call, we will default to using git diff instead. The only risk is PRs with exactly 30 changed files, but using git diff should not significantly change any result.

Checklist

  • Change(s) are motivated and described in the PR description.
  • Testing strategy is described if automated tests are not included in the PR.
  • Risk is outlined (performance impact, potential for breakage, maintainability, etc).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Library release note guidelines are followed. If no release note is required, add label changelog/no-changelog.
  • Documentation is included (in-code, generated user docs, public corp docs).
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Title is accurate.
  • No unnecessary changes are introduced.
  • Description motivates each change.
  • Avoids breaking API changes unless absolutely necessary.
  • Testing strategy adequately addresses listed risk(s).
  • Change is maintainable (easy to change, telemetry, documentation).
  • Release note makes sense to a user of the library.
  • Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@Yun-Kim Yun-Kim added the changelog/no-changelog A changelog entry is not required for this PR. label Aug 11, 2023
@Yun-Kim Yun-Kim requested a review from a team as a code owner August 11, 2023 14:46
@emmettbutler emmettbutler enabled auto-merge (squash) August 11, 2023 18:11
@emmettbutler emmettbutler merged commit f843f74 into 1.x Aug 11, 2023
12 of 13 checks passed
@emmettbutler emmettbutler deleted the yunkim/git-diff-30-files branch August 11, 2023 18:13
@github-actions github-actions bot added this to the v1.19.0 milestone Aug 11, 2023
@P403n1x87
Copy link
Contributor

@Yun-Kim do you think we can perhaps explore pagination to see if we can actually get the full list of changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants