-
Notifications
You must be signed in to change notification settings - Fork 243
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
Centralize environment configuration #6293
Centralize environment configuration #6293
Conversation
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
070eec1
to
4e7aead
Compare
2544714
to
6436cde
Compare
67387da
to
ef554b1
Compare
Rebased on main to use go v1.18 |
ef554b1
to
c43101c
Compare
Expect(err).To(BeNil()) | ||
tempFile, err := ioutil.TempFile("", "telemetry") | ||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(setDebugTelemetryFile(tempFile.Name())).NotTo(HaveOccurred()) | ||
Expect(tempFile.Close()).NotTo(HaveOccurred()) | ||
} | ||
|
||
func GetDebugTelemetryFile() string { | ||
return os.Getenv(DebugTelemetryFileEnv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this env var be obtained via envcontext or are you using the library since it's a test helper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In integration tests, we don't need to rely on the envcontext package
func setDebugTelemetryFile(value string) error { | ||
return os.Setenv(segment.DebugTelemetryFileEnv, value) | ||
return os.Setenv(DebugTelemetryFileEnv, value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you not using envcontext.WithConfig to set this env var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are integration tests (we are not inside odo), we need to check that odo reads the values from the environment variables
7a0aee3
to
14183f9
Compare
14183f9
to
51cbfaf
Compare
Rebased to fix conflict on |
a1afb1a
to
e0a7f88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM feature-wise.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rm3l 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 |
Kubernetes Tests failed rather quickly with the following error on cloning the repo:
Let's trigger them again... |
Removed old namepaces on Windows cluster before restarting the tests |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/override ci/prow/v4.11-integration-e2e |
@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e In response to this:
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. |
What type of PR is this:
/kind feature
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #6149
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
See this wiki page for more information: https://github.com/redhat-developer/odo/wiki/Dev:-Code-architecture