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

test/e2e: Fix unset $KUBECONFIG when gathering CI testing artifacts #2450

Conversation

timflannagan
Copy link
Member

Description of the change:
Update the testing e2e packages and ensure that the $KUBECONFIG
environment variable is correctly set before running the bash script
responsible for collecting CI artifacts.

This should fix the following error message that was popping up in
individual CI runs:

collecting logs in the ./artifacts/ artifacts directory
../test/e2e/collect-ci-artifacts.sh: line 7: KUBECONFIG: parameter null or not set
failed to collect namespace artifacts: exit status 1

Update the kind provisioner to avoid prematurely removing the temporary
directory that contains the constructed (and ephemeral) kubeconfig file
and track that metadata in the TestContext structure. In the case that
field is unset for that object, fall back to the os.Getenv("KUBECONFIG")
value.

Signed-off-by: timflannagan [email protected]

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive

Update the testing e2e packages and ensure that the $KUBECONFIG
environment variable is correctly set before running the bash script
responsible for collecting CI artifacts.

This should fix the following error message that was popping up in
individual CI runs:

```
collecting logs in the ./artifacts/ artifacts directory
../test/e2e/collect-ci-artifacts.sh: line 7: KUBECONFIG: parameter null or not set
failed to collect namespace artifacts: exit status 1
```

Update the kind provisioner to avoid prematurely removing the temporary
directory that contains the constructed (and ephemeral) kubeconfig file
and track that metadata in the TestContext structure. In the case that
field is unset for that object, fall back to the os.Getenv("KUBECONFIG")
value.

Signed-off-by: timflannagan <[email protected]>
@timflannagan
Copy link
Member Author

c7ff58d is a debug commit to verify these changes worked in CI without aimlessly retesting e2e to verify. Took a look at the action output in https://github.com/operator-framework/operator-lifecycle-manager/actions/runs/1467855894 for more information, but I'm going to remove that debug commit and push back up.

@timflannagan timflannagan force-pushed the test/kind-provisioner-kubeconfig-parameter-unset branch from c7ff58d to 40124fb Compare November 16, 2021 18:03
@tylerslaton
Copy link
Contributor

/approve

@tylerslaton
Copy link
Contributor

/approve cancel

@tylerslaton
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 17, 2021
@kevinrizza
Copy link
Member

/approve

@openshift-ci
Copy link

openshift-ci bot commented Nov 17, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kevinrizza, timflannagan

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2021
@openshift-merge-robot openshift-merge-robot merged commit 6dc9026 into operator-framework:master Nov 17, 2021
@timflannagan timflannagan deleted the test/kind-provisioner-kubeconfig-parameter-unset branch November 17, 2021 15:56
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants