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

Fix lint CI and split it into multiple jobs #2785

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented Nov 2, 2024

Motivation

On #1737 we added continue-on-error on the job level. AFAIU that will succeed even if the entire jobs fails with a cancellation for example, which will happen when we timeout.
This was causing this job to silently succeed while timing out for a while.

Proposal

Split the different lints into their own jobs, adding parallelism and also giving us individual failures

Test Plan

CI

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Copy link
Contributor Author

ndr-ds commented Nov 2, 2024

@ma2bd
Copy link
Contributor

ma2bd commented Nov 2, 2024

Should we just not use continue-on-error and split the linting jobs in several parallel workflows?

Copy link
Contributor Author

ndr-ds commented Nov 2, 2024

We could! That'll be a lot of jobs though 😅 And the only time consuming one here is the check-all-features which I'm splitting off to a separate job in the following PR. Happy to split it further though

@ndr-ds ndr-ds force-pushed the 11-01-lint_has_been_silently_timing_out branch from 3ffafd9 to 1f6268a Compare November 2, 2024 00:59
Copy link
Contributor Author

ndr-ds commented Nov 2, 2024

Looking at the documentation more, I think that if the last job without continue-on-error succeeds, the job will succeed regardless of the errors from the other jobs. So I agree, it seems the best solution here is to split everything in multiple parallel lint jobs. I'll do that

@ndr-ds ndr-ds force-pushed the 11-01-lint_has_been_silently_timing_out branch 6 times, most recently from c68473d to 3e17207 Compare November 2, 2024 02:48
.github/workflows/rust.yml Outdated Show resolved Hide resolved
@ndr-ds ndr-ds force-pushed the 11-01-lint_has_been_silently_timing_out branch 3 times, most recently from 2010c9e to f9fa551 Compare November 4, 2024 17:47
@ndr-ds ndr-ds marked this pull request as ready for review November 4, 2024 18:54
@ndr-ds ndr-ds force-pushed the 11-01-lint_has_been_silently_timing_out branch from f9fa551 to d4706f4 Compare November 4, 2024 20:37
@ndr-ds ndr-ds changed the title Lint has been silently timing out Fix lint CI and split it into multiple jobs Nov 5, 2024
@@ -160,10 +160,9 @@ jobs:
cd linera-views
WASM_BINDGEN_TEST_TIMEOUT=300 wasm-pack test --chrome --headless -- --features web-default

lint:
unexpected-chain-load-operations:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we keep lint somewhere in the name? Maybe lint-unexpected-chain-load-operations

Copy link
Contributor

@ma2bd ma2bd Nov 5, 2024

Choose a reason for hiding this comment

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

(even better) Should we group the fast lints together to save git-checkout time?

Copy link
Contributor

Choose a reason for hiding this comment

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

Never mind "checkout" is surprisingly fast.

"Clear some space" is slow, though. In fact, we probably shouldn't do it for linters.

@@ -176,6 +175,19 @@ jobs:
- name: Check for unexpected chain load operations
run: |
./scripts/check_chain_loads.sh

check-copyright-headers:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Maybe lint-check-copyright-headers. In fact lint-cargo-clippy is probably logical after that

@@ -227,12 +296,54 @@ jobs:
cargo rdme --check --no-fail-on-warnings -w "${dir_name}"
fi
done)

wasm-application-lints:
Copy link
Contributor

Choose a reason for hiding this comment

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

lint-wasm-application?

@ndr-ds ndr-ds force-pushed the 11-01-lint_has_been_silently_timing_out branch from d4706f4 to 83d1692 Compare November 5, 2024 01:48
@ndr-ds ndr-ds force-pushed the 11-01-lint_has_been_silently_timing_out branch from 83d1692 to 792bc4c Compare November 5, 2024 12:30
@ndr-ds ndr-ds force-pushed the 11-01-lint_has_been_silently_timing_out branch from 792bc4c to a5479f7 Compare November 5, 2024 14:26
Copy link
Contributor Author

ndr-ds commented Nov 5, 2024

Merge activity

  • Nov 5, 10:19 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Nov 5, 10:19 AM EST: A user merged this pull request with Graphite.

@ndr-ds ndr-ds merged commit 88ff8b3 into main Nov 5, 2024
15 checks passed
@ndr-ds ndr-ds deleted the 11-01-lint_has_been_silently_timing_out branch November 5, 2024 15:19
ndr-ds pushed a commit that referenced this pull request Nov 5, 2024
## Motivation

CI takes a long time

## Proposal

Split into more jobs, which will make us do roughly the same amount of work, but more parallelized. So hopefully this reduces CI time without increasing github costs much.

## Test Plan

CI
With this and the PR before this one (#2785), we went from having the `test` job sometimes take up to an hour, to now, running many jobs in parallel, the test that takes the longest is `check-all-features`, which takes around 30 minutes.

## Release Plan

- Nothing to do / These changes follow the usual release cycle.
ma2bd pushed a commit that referenced this pull request Nov 11, 2024
On #1737 we added `continue-on-error` on the job level. AFAIU that will succeed even if the entire jobs fails with a cancellation for example, which will happen when we timeout.
This was causing this job to silently succeed while timing out for a while.

Split the different lints into their own jobs, adding parallelism and also giving us individual failures

CI

- Nothing to do / These changes follow the usual release cycle.
ma2bd pushed a commit that referenced this pull request Nov 11, 2024
## Motivation

CI takes a long time

## Proposal

Split into more jobs, which will make us do roughly the same amount of work, but more parallelized. So hopefully this reduces CI time without increasing github costs much.

## Test Plan

CI
With this and the PR before this one (#2785), we went from having the `test` job sometimes take up to an hour, to now, running many jobs in parallel, the test that takes the longest is `check-all-features`, which takes around 30 minutes.

## Release Plan

- Nothing to do / These changes follow the usual release cycle.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants