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

Why does -parallel and -fail-fast can't be used together? #385

Closed
Fricounet opened this issue Feb 19, 2024 · 10 comments
Closed

Why does -parallel and -fail-fast can't be used together? #385

Fricounet opened this issue Feb 19, 2024 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@Fricounet
Copy link
Contributor

Hello 👋
I'm trying to understand why flags -parallel and -fail-fast can't be used together. I've looked at the PR that implemented the fail-fast but couldn't find a reason as to why they can't be used together.
I'm asking because I've been using -fail-fast with t.Parallel() in my tests without running into any issue so I wonder what is different with -parallel?

@vladimirvivien
Copy link
Contributor

@Fricounet
Apologies for the delay.
So, you are saying that you can run tests with --fail-fast and call to t.Parallel but can't do it with --parallel flag ?
Do you get an error ?

@Fricounet
Copy link
Contributor Author

@vladimirvivien no worries
Well the error I get when running -fail-fast and parallel is part of the framework itself. It is defined here https://github.com/kubernetes-sigs/e2e-framework/blob/main/pkg/flags/flags.go#L283

That's why I don't quite understand why 😅 I thought that maybe I'm just missing some context on why this decision was made initially

@vladimirvivien
Copy link
Contributor

@Fricounet Looking at the code I think I remember why it was encoded like that.
Maybe the thinking was that if the framework is executing tests concurrently, fail-fast would have to be applied to all tests inflight and end the entire test run. Having that mutual exclusivity makes it easier to reason about.

If you have an idea that can make this better, you should definitely discuss here. Again, a lot of those decisions were done early on, so they may be due for a revisit.

@Fricounet
Copy link
Contributor Author

@vladimirvivien What do you think about canceling the parent context if fail-fast is enabled? This way all currently running tests would have to stop too?

I can try to take a look and see if I can come up with a PR.
Thanks for the context anyway :)

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 23, 2024
@vladimirvivien
Copy link
Contributor

@Fricounet are you still interested in working on this ?

@Fricounet
Copy link
Contributor Author

@vladimirvivien yes! I'll try to work on this next week

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 31, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants