-
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
odo dev store information about currently forwarded ports #5703
odo dev store information about currently forwarded ports #5703
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
949f06f
to
fce2b60
Compare
882b584
to
c1523ef
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.
Just a very first quick look. I am yet to review the other changes in this PR :)
docs/website/versioned_docs/version-3.0.0/command-reference/dev.md
Outdated
Show resolved
Hide resolved
9a4d0a9
to
816ddb3
Compare
docs/website/versioned_docs/version-3.0.0/command-reference/dev.md
Outdated
Show resolved
Hide resolved
f50bff5
to
fc6d6b9
Compare
docs/website/versioned_docs/version-3.0.0/command-reference/dev.md
Outdated
Show resolved
Hide resolved
…v.md Co-authored-by: Armel Soro <armel@rm3l.org>
In case of error during initialization, odo dev cleanup the resources
02b56ba
to
6382aba
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
// SetForwardedPorts sets the forwarded ports in the state file and saves it to the file, updating the metadata | ||
SetForwardedPorts(fwPorts []api.ForwardedPort) error |
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.
Thinking out loud - why do we want business layer to get involved with storing the state? Isn't this something that odo "CLI" is interested in doing? Maybe a different implementation using odo as library would not want to store the state.
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 any case, we want to create an abstraction for the state, hence this package.
For me, it is a business concern, as it is a way to be able to give to the CLI the state of the Dev session at any time. Any other CLI would be interested in getting this state.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dharmit 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 |
/lgtm |
…eloper#5703) * Save state (forwarded ports + PID + timestamp) to local file and cleanup * Integration tests * Documentation * Update docs/website/versioned_docs/version-3.0.0/command-reference/dev.md Co-authored-by: Armel Soro <armel@rm3l.org> * Fail when an error happens writing state file In case of error during initialization, odo dev cleanup the resources * Fix typo * Test localPort matches a number * Remove PID and timestamp from state + rename to devstate.json * Run IBM cloud tests as non root * Fix doc * Review * Remove reference to PID/timestamp from doc Co-authored-by: Armel Soro <armel@rm3l.org>
What type of PR is this:
/kind feature
What does this PR do / why we need it:
See issue.
The PR updates the image used to run tests on IBM Cloud to be able to run tests as non-root user, to make a new test relying on user rights pass.
Which issue(s) this PR fixes:
Fixes #5676
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
The values for the forwarded ports are obtained through the
PortWriter
, from the text written by the low level port forwarder. This is because we need to get the information of the local port when we are using random ports (with --random-ports flag).