Skip to content

[Ops] Fix scoped type check#167229

Merged
watson merged 1 commit intoelastic:mainfrom
watson:fix-scoped-type-checkl
Sep 26, 2023
Merged

[Ops] Fix scoped type check#167229
watson merged 1 commit intoelastic:mainfrom
watson:fix-scoped-type-checkl

Conversation

@watson
Copy link
Contributor

@watson watson commented Sep 26, 2023

Problem

The .buildkite/scripts/steps/check_types_commits.sh script (introduced in #167060) is comparing the latest commit of the PR against the target branch (usually main). But if the PR is not fully up to date with the target branch, the diff is also going to contain any changes that has landed in the target branch since the PR was branched off. This is going to include a lot of extra tsconfig.json files not related to the PR and will make solving the TypeScript errors a lot harder for the PR author.

Solution

Limit diff to just the files contained in the PR by finding the closest common ancestor between the target branch and the current HEAD.

(This PR also makes the .buildkite/scripts/steps/check_types_commits.sh file executable.)

Limit diff to just the files contained in the PR
@watson watson added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Sep 26, 2023
@watson watson requested a review from a team as a code owner September 26, 2023 10:02
@watson watson self-assigned this Sep 26, 2023
@watson watson enabled auto-merge (squash) September 26, 2023 10:03
@watson watson disabled auto-merge September 26, 2023 10:25
@watson watson enabled auto-merge (squash) September 26, 2023 10:29
@watson watson disabled auto-merge September 26, 2023 10:38
@watson watson merged commit 192bd5a into elastic:main Sep 26, 2023
@watson watson deleted the fix-scoped-type-checkl branch September 26, 2023 10:38
@watson
Copy link
Contributor Author

watson commented Sep 26, 2023

Merged ahead of complete CI run due to this impacting a lot of developers. The modified CI steps did complete before merging

@kibana-ci
Copy link

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #27 / serverless common UI Index Management Create enrich policy "before all" hook for "shows create enrich policies page and docs link"

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @watson

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

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants