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

Remove lengthly operations from hermetic tests 🧪 #4590

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

bobcatfish
Copy link
Collaborator

Changes

Just WIP for now b/c I want to try out a couple of things first :D

Also use Errorf instead of Fatalf between the two tests (the hermetic
test and the non-hermetic tests) so that if one fails the other will
still run.

In #4567 we see that the hermetic end to end test sometimes fails,
specifically it seems to be the not-hermetic-run-as-root version of
the test, and it seems like the failure is hitting the 1 minute timeout.

Looking at the test, it seems to be doing an apt-get update which
seems like an operation that would be in grave danger of sometimes
taking a while (especially depending on what version of the latest
ubuntu image is running) so although I'm not sure that's what is causing
the problem, I want to try doing something that is less likely to take
so long but still would require network access, as well as something
that would require priviledged access - which I assume is why the update
was included, to capture the combo of network access and doing something
priviledged. I'm still a bit confused about why both of those elements
are present - I assume both are not allowed in hermetic mode but it
would probably make more sense to test them separately to be sure they
each fail, otherwise only one is covered (i.e. either the network call
is going to fail and halt things, or the priviledged operation)

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 16, 2022
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 16, 2022
@bobcatfish
Copy link
Collaborator Author

My plan is to try a couple of things to make sure the test is still actually testing what it should and then I'm thinking we could try this out and see if the flake stops happening.

Also use Errorf instead of Fatalf between the two tests (the hermetic
test and the non-hermetic tests) so that if one fails the other will
still run.

In tektoncd#4567 we see that the hermetic end to end test sometimes fails,
specifically it seems to be the `not-hermetic-run-as-root` version of
the test, and it seems like the failure is hitting the 1 minute timeout.

Looking at the test, it seems to be doing an `apt-get update` which
seems like an operation that would be in grave danger of sometimes
taking a while (especially depending on what version of the latest
ubuntu image is running) so although I'm not sure that's what is causing
the problem, I want to try doing something that is less likely to take
so long but still would require network access.

I thought maybe that it was also trying to do somethign that required
priviledged execution (i.e. running as root) but it seems like that's
not something that hermetic mode drops anyway (looking at the TEP it
seems to just be scoped to networking) so it doesn't feel like there is
actually any need for that.
@bobcatfish
Copy link
Collaborator Author

Didn't get a chance to do as much investigation as I'd hoped, but I suggest we still give this a try - we can always reopen the flakey test issue and continue investigating if it persists.

Fixes #4567

@bobcatfish bobcatfish marked this pull request as ready for review March 18, 2022 21:11
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 18, 2022
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 21, 2022
@lbernick
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2022
@lbernick
Copy link
Member

/test pull-tekton-pipeline-alpha-integration-tests

@tekton-robot tekton-robot merged commit 2c025fb into tektoncd:main Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants