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

Skipped Integration Tests #6079

Closed
chitrangpatel opened this issue Jan 31, 2023 · 11 comments
Closed

Skipped Integration Tests #6079

chitrangpatel opened this issue Jan 31, 2023 · 11 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@chitrangpatel
Copy link
Contributor

chitrangpatel commented Jan 31, 2023

While working on PR #6072, I noticed that 5 alpha integration tests were skipped.

Of the five, two were because they require embedded-status: full and enable-provenance-in-status: true. However, the kind-e2e tests set the feature flags to specific values for all integration tests. Therefore, these tests are skipped as a result and could potentially lead us to merge broken code.

I think this is surfacing now because we have many independent feature flags like results-from, embedded-status, enable-provenance-in-status etc. and some alpha features require one set of values while other alpha features could require a different value.

I think we require some restructuring of our integration tests.

WDYT?

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 31, 2023
@Yongxuanzhang
Copy link
Member

Yongxuanzhang commented Jan 31, 2023

Good point! I also encounter this before but didn't think this as a bug.

I think one option is: those tests need feature flags not set by the script could set them in the test itself like:

configMapData := map[string]string{
"resource-verification-mode": config.EnforceResourceVerificationMode,
}

And reset the config after the test is done.

This is based on the tests are not running in parallel

@chitrangpatel
Copy link
Contributor Author

chitrangpatel commented Jan 31, 2023

Yes, I agree. That's what needs to happen. I needed to do that for larger results.

However, after the test is complete, we also need to unset those feature flags and set them back to what they were. Otherwise, tests that follow will get the feature flags that you set in the tests and it can break them. This is because the feature flags are applied to the namespace tekton-pipelines instead of arendelle....

But as you can see, it is easy to miss and prone to errors. I was wondering if we should rethink the strategy where instead of having requireAllGates or requireAnyGate which can lead to skipping of tests, we explicitly set the feature flag that the test needs and then set it back to default when that test is complete.

Again, just a thought. It might cause more issues than what I foresee at the surface level.

@Yongxuanzhang
Copy link
Member

Yes, I agree. That's what needs to happen. I needed to do that for larger results.

However, after the test is complete, we also need to unset those feature flags and set them back to what they were. Otherwise, tests that follow will get the feature flags that you set in the tests and it can break them. This is because the feature flags are applied to the namespace tekton-pipelines instead of arendelle....

But as you can see, it is easy to miss and prone to errors. I was wondering if we should rethink the strategy where instead of having requireAllGates or requireAnyGate which can lead to skipping of tests, we explicitly set the feature flag that the test needs and then set it back to default when that test is complete.

Again, just a thought. It might cause more issues than what I foresee at the surface level.

I think we are talking about the same solution. 😅 Set the flag and reset when that test is done.

@chitrangpatel
Copy link
Contributor Author

One other thing I found is that in order to fix the broken tests, I had to remove t.Parallel() so that it does not run in parallel with the other tests. This is because when my test updated the feature flags, it affected other tests running in parallel that would error when running along side mine.

@Yongxuanzhang
Copy link
Member

One other thing I found is that in order to fix the broken tests, I had to remove t.Parallel() so that it does not run in parallel with the other tests. This is because when my test updated the feature flags, it affected other tests running in parallel that would error when running along side mine.

yeah, I also mentioned that in my previous comment. I think this is important.

This is based on the tests are not running in parallel

@chitrangpatel
Copy link
Contributor Author

chitrangpatel commented Jan 31, 2023

I wanted to add that while this is doable for e2e tests, we cannot do this for example tests since all example tests will have the same feature flags for all.

I guess, my main point is if we think it's ok for this process to be as is or if we think it should be improved.

At the very least, we should document this process in the developer documentation.

@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 1, 2023
@tekton-robot
Copy link
Collaborator

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-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 May 31, 2023
@tekton-robot
Copy link
Collaborator

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Collaborator

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

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/test-infra repository.

@lbernick
Copy link
Member

lbernick commented Jul 6, 2023

/lifecycle frozen

@lbernick lbernick reopened this Jul 6, 2023
@tekton-robot tekton-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jul 6, 2023
@lbernick lbernick self-assigned this Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

4 participants