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

Instead of overriding the env variables add them to the environment. #264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbtk
Copy link
Contributor

@jbtk jbtk commented Apr 25, 2024

Before this change if needed to pass additional env variable to the ginkgo tester it would remove other variables. With this change it adds variables specified in the commandline.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 25, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @jbtk!

It looks like this is your first PR to kubernetes-sigs/kubetest2 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubetest2 has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 25, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @jbtk. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 25, 2024
@MushuEE
Copy link
Contributor

MushuEE commented May 7, 2024

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jbtk, MushuEE

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2024
@MushuEE
Copy link
Contributor

MushuEE commented May 7, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 7, 2024
@jbtk
Copy link
Contributor Author

jbtk commented May 7, 2024

It seems that the test is setting env variable to use bazel 5.3.0 and then something else expects that bazel version is >= 5.4.0.

@jbtk
Copy link
Contributor Author

jbtk commented May 8, 2024

Actually I can repro this problem locally without my change. Is there any place where these test runs as continues integration to see whether this happens there as well?

I will update the version to 5.4.0 and let it retest.

Before this change if needed to pass additional env variable to the
ginkgo tester it would remove other variables. With this change it adds
variables specified in the commandline.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2024
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot
Copy link
Contributor

@jbtk: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubetest2-gce-build-up-down 225b6ae link true /test pull-kubetest2-gce-build-up-down

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@jbtk
Copy link
Contributor Author

jbtk commented May 9, 2024

I pushed a new version, but it was only caused by some changes in my local repo. I moved the change of the version to a separate PR (#265). Please let it test and approve if it is ok. Once this is done I will update this version so that the test passes.

@BenTheElder
Copy link
Member

Before this change if needed to pass additional env variable to the ginkgo tester it would remove other variables. With this change it adds variables specified in the commandline.

Those values should be added as flags to the tester ..?

The not passing through env is by design. It makes tests more reproducible.

@jbtk
Copy link
Contributor Author

jbtk commented May 9, 2024

The cl came from the fact that I struggled to run tests in legacy mode (see issue for details: #263).

It seems that kubetest2 sets a various env variables and therefore passing one additional and clearing them breaks the test (at least this is what happens in the legacy mode). I am not sure whether expecting person who wants to add/update one env variable to know how to specify all of them is a good solution (though I might be missing something - as you see in the issue running tests was a journey for me because I do not know the ecosystem well enough). From my testing it seemed that passing empty does not clear previously existing env and passing a single one does clear them and sets only the defined env variable. This is confirmed in the Env field of the Cmd: https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/os/exec/exec.go;l=163. So currently we are actually passing all the env vars unless user specifies env flags and then we only set what is specified (and clear what would be normally passed otherwise).

@k8s-triage-robot
Copy link

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

This bot triages PRs 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR 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 Aug 7, 2024
@k8s-triage-robot
Copy link

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

This bot triages PRs 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR 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 removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 6, 2024
@k8s-ci-robot k8s-ci-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Sep 6, 2024
@jbtk
Copy link
Contributor Author

jbtk commented Sep 13, 2024

/remove-lifecycle stale

Since I explained why I proposed this PR and did not get any response I am restarting the clock. If I do not get any answer in 30d I will just close this pr.

@jbtk
Copy link
Contributor Author

jbtk commented Sep 13, 2024

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Sep 13, 2024
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants