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

Move CI lint/format checks into separate file #843

Merged
merged 3 commits into from
Jan 19, 2025

Conversation

mhucka
Copy link
Member

@mhucka mhucka commented Jan 17, 2025

This is the first PR in what will be several PRs to update and improve the CI checks workflows. This PR simply moves the lint & format checks to a new, separate workflow file (ci-file-checks.yaml) and renames ci.yaml to ci-build-checks.yaml. There are no functional changes, apart from adjusting the conditions of the build tests in ci-build-checks.yaml to not condition them on passing lint/format checks.

Lint/format checks are not a strictly necessary precondition to testing builds and doing unit tests, and running them in parallel affords a couple of advantages:

  • Faster overall CI execution.
  • Potential for more feedback. If a lint step fails, it doesn't necessarily mean that the code won't compile, and proceeding with the build tests gives devs as much feedback as possible.

There is of course the danger that the code changes won't compile, and the resulting build will be pointless (and possibly produce confusing error messages). I think devs will be smart enough to realize that if they see both lint/format errors and build errors, they should fix the former first. In addition, we can tune the conditions in the builds so that they fail early.

This is the first PR in what will be several PRs to update and improve
the CI checks workflows. This PR simply moves the lint & format checks
to a new, separate workflow file (`ci-file-checks.yaml`) and renames
`ci.yaml` to `ci-build-checks.yaml`. There are no functional changes,
apart from adjusting the conditions of the build tests in
`ci-build-checks.yaml` not condition them on passing lint/format
checks.

Lint/format checks are not a strictly necessary precondition to
testing builds and doing unit tests, and running them in parallel
affords a couple of advantages:

- Faster overall CI execution.
- Potential for more feedback. If a lint step fails, it doesn't
  necessarily mean that code won't compile, and proceeding with the
  build tests gives devs as much feedback as possible.

There is of course the danger that the code changes won't compile, and
the resulting build will be pointless (and possibly produce confusing
error messages). I think devs will be smart enough to realize that if
they see _both_ lint/format errors and build errors, they should fix
the former first. In addition, we can tune the conditions in the
builds so that they fail early.
@mhucka mhucka marked this pull request as ready for review January 17, 2025 21:30
@mhucka mhucka enabled auto-merge January 17, 2025 23:46
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

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

LGTM

@mhucka mhucka merged commit deb5b7d into tensorflow:master Jan 19, 2025
6 of 7 checks passed
@mhucka mhucka self-assigned this Jan 21, 2025
@mhucka mhucka added kind/chore Maintenance & housekeeping tasks area/ci Concerns continuous integration workflows and infrastructure labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Concerns continuous integration workflows and infrastructure kind/chore Maintenance & housekeeping tasks
Development

Successfully merging this pull request may close these issues.

2 participants