Skip to content

ci: Merge smaller Engine & CLI split jobs into Engine & CLI - #8998

Merged
gerhard merged 1 commit into
dagger:mainfrom
gerhard:ci-remove-engine-and-cli-workflow
Nov 21, 2024
Merged

gerhard merged 1 commit into
dagger:mainfrom
gerhard:ci-remove-engine-and-cli-workflow

Conversation

@gerhard

@gerhard gerhard commented Nov 19, 2024 •

Copy link
Copy Markdown
Contributor

We introduced an alternative workflow which splits the big test suites into smaller ones that have appropriately-sized CI runners. Context:

Now that we have been running both workflows in parallel for 4 months and have a long-term understanding of their behaviour, we are going to temporarily pause the less reliable jobs and save on infra costs. For more details on the two workflows see this original issue description which has been kept up-to-date all these months:

As a reminder, we are doing this change so that we:

  • mark a new milestone in this saga which started 6 months ago, in May 2024: 🧐 dagger call --source=.:default test all is timing out locally - inconsistent behaviour #7339
  • make progress towards All our jobs succeed 90% of the time and finish within 10 minutes (this change effectively makes our longest job be ~11mins)
  • make all contributors wait less for all PR checks to be green (including re-running jobs which fail intermittently)
  • save on CI infra costs which have doubled since September and are on track to reach $10k just for November

@aluzzardi

Copy link
Copy Markdown
Contributor

Reading through the context from #7863: I understand the original reason to not do this was to give us a chance to understand the root cause of the performance issues.

Since we've made quite some progress on that front, and it's becoming pretty painful to maintain our flaky CI, I'm in favor of going ahead with this while still being able to debug performance issues locally.

We could always add an "all in one" run as a separate on demand workflow if we want to "feel the pain" again. But should keep our production CI stable.

Thoughts @sipsma @jedevc ?

@sipsma sipsma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reading through the context from #7863: I understand the original reason to not do this was to give us a chance to understand the root cause of the performance issues.
Since we've made quite some progress on that front, and it's becoming pretty painful to maintain our flaky CI, I'm in favor of going ahead with this while still being able to debug performance issues locally.

It's more that flakes indicate a problem and I'd rather us know about problems so that we can fix them, which is what a lot of us have been doing (between all our other work). I don't want us to just plug our ears by running tests in such a way that we side-step real problems. E.g. just in the week or so these actual problems were surfaced from test flakes and fixed:

That's among other fixes that ended up being "test-only" issues and all the other real problems which have been found via flakey failures and fixed over the past months.


I am okay with making this change for now because we still hit enough flakes in the split workflows and agree that we may as well save on infra costs for now.

But my ask is that when we hit flakes in these split workflows, we actually put effort into debugging them rather than continuing to treat the tests as a black box that can only be fixed by rearranging how they are run. I realize that we can't all just instantly drop everything we are doing, but we can at least track them in issues if nothing else so we know what flakes exist and any ongoing debugging we've done. e.g. the flake that happened in the Engine & CLI split / test-modules workflow in this PR has an issue here

Comment thread .github/workflows/engine-and-cli.yml Resolved
@jedevc

jedevc commented Nov 20, 2024 •

Copy link
Copy Markdown
Contributor

Agreed with @sipsma, these flakes are somewhat "real" - almost all of them historically have been actually representative of real issues (in our test code, or in the engine). Even the weird internal go module cache bug we hit has actually been hit by a customer in production - we found that first through our CI.

I think it is frustrating to have a bunch of weird red flakes on PRs, and it does slow velocity for sure - but if we aren't aware of these issues, I am worried we'll lose some of our awareness of these particularly subtle issues. In the worst case, our tests might actually become entirely dependent on running separately, and might not be able to run together if they use the same machine (which I think is eventually our long term goal).

I don't really know how to balance our infra costs and our velocity, vs our ability to get a heads up on some of the trickiest bugs (that do sometimes come back to haunt our customers). If we need to do this for cost related reasons, or if it's clearly slowing down everyone, then I'm on board. Personally - I'd rather continue to "feel the pain", but also I'm aware I've not been doing as much as I should be to reduce flakes, and as someone with knowledge of the area, I'm less affected by the flakes, since I know what needs rerunning - so happy to be told otherwise here.

I think we do need to eventually come back to the idea of merging all our test workflows together - this split shouldn't be the final state: the fact we need to do it at all feels like a bit of a hack.

@gerhard

gerhard commented Nov 21, 2024 •

Copy link
Copy Markdown
Contributor Author

As discussed yesterday with @sipsma @jedevc @cwlbraa, this PR will:

  • Merge the smaller jobs into the Engine & CLI workflow
  • Comment the larger jobs with the intent of adding them back when the workflow with the smaller jobs is more stable. The actual number that I have in mind is at least 80% success rate over 2 consecutive weeks. More details: Engine & CLI tests are reliable & fast #8184
  • After this PR gets merged, add a marker where we track the reliability of these CI jobs

As a new habit, we - @dagger/maintainers - should create new issues when jobs fail. Remember to label with area/ci & kind/flake. Before creating a new issue, we should check if there is an existing issue for that particular failure. We seem to have quiet a few already: kind/flake Sometimes failing, sometimes not

As a reminder, we are doing this change so that we:

  • mark a new milestone in this saga which started 6 months ago, in May 2024: 🧐 dagger call --source=.:default test all is timing out locally - inconsistent behaviour #7339
  • make progress towards All our jobs succeed 90% of the time and finish within 10 minutes (this change effectively makes our longest job be ~11mins)
  • make all contributors wait less for all PR checks to be green (including re-running jobs which fail intermittently)
  • save on CI infra costs which have doubled since September and are on track to reach $10k just for November

Tackling the outstanding items now. Will ask for another round of reviews when done.

@gerhard

gerhard commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

How does this look now @jedevc @sipsma ?

@gerhard
gerhard requested a review from vito November 21, 2024 17:23

@vito vito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving, sounds like everyone's on the same page now 😇

@gerhard gerhard changed the title ci: Remove Engine & CLI workflow ci: Merge smaller Engine & CLI split jobs into Engine & CLI Nov 21, 2024
@gerhard

gerhard commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

Thank you @vito ! Will merge as soon as all checks pass.

- "daggerverse-preview"
- "Docs"
- "Engine & CLI split"
- "Engine & CLI"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oop, think we need to remove the split one now with the latest changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch 🥍

We introduced an alternative workflow which splits the big test suites
into smaller ones that have appropriately-sized CI runners. Context:
- #7863
- #8212

Now that we have been running both workflows in parallel for 4 months
and have a long-term understanding of their behaviour, we are going to
**temporarily** pause the less reliable jobs and save on infra
costs. For more details on the two workflows see this original issue
description which has been kept up-to-date all these months:
- #8184

As a reminder, we are doing this change so that we:
- mark a new milestone in this saga which started 6 months ago, in
  May 2024: #7339
- make progress towards `All our jobs succeed 90% of the time and
  finish within 10 minutes` (this change effectively makes our longest
  job be ~11mins)
- make all contributors wait less for all PR checks to be green
  (including re-running jobs which fail intermittently)
- save on CI infra costs which have doubled since September and are on
  track to reach `$10k` just for November

Signed-off-by: Gerhard Lazu <[email protected]>
@gerhard

gerhard commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

Merging as all checks passed already and the only change was @jedevc very nice catch 🥍

@gerhard
gerhard merged commit db30d6f into dagger:main Nov 21, 2024
@gerhard
gerhard deleted the ci-remove-engine-and-cli-workflow branch November 21, 2024 17:54
@gerhard gerhard mentioned this pull request Nov 28, 2024
2 of 5 tasks
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.

5 participants