-
Notifications
You must be signed in to change notification settings - Fork 244
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
change debugport in container if its different from env_info #4785
change debugport in container if its different from env_info #4785
Conversation
for i, envVar := range container.Env { | ||
if envVar.Name == adaptersCommon.EnvDebugPort { | ||
if envVar.ValueFrom == nil && (envVar.Value != strconv.Itoa(devfileDebugPort)) { | ||
container.Env[i].Value = strconv.Itoa(devfileDebugPort) | ||
break |
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.
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.
added
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
@mik-dass the lgtmer has to approve also, please can approve it as well. |
I think, in a recent discussion, it was decided to have two reviewers on each PR. |
Ack, thank you for reminding |
@girishramnani I followed the below steps: $ git clone https://github.com/odo-devfiles/nodejs-ex
$ cd nodejs-ex
$ odo create --s2i nodejs node-s2i
$ odo env set DebugPort 8888
$ cat .odo/env/env.yaml
ComponentSettings:
Name: node-s2i
Project: myproject
AppName: app
DebugPort: 8888
RunMode: run
$ odo push
$ odo exec -- env | grep DEBUG
DEBUG_PORT=5858
$ grep DEBUG_PORT devfile.yaml
- name: DEBUG_PORT
value: "5858" There are two concerns I have:
Am I testing this the right way? cc @kadel |
#4615 (comment) gives me an impression that these two are different things. 😕 |
@dharmit the debug port only gets changed in devfile when you provide You can still see the debug port in the env because its part of the original env of the s2i and gets passed to the devfile. Please follow the same steps but with |
That works. But should we also change the I think env.yaml is for environment specific information and it can have values different from devfile. But I would like to be sure. |
From UX perspective, how do we convey this to the user that they must do |
This been a standard set in devfile already since a while now |
Technically you can but changing debug port from what it is using its feels more of a tool to override the value in devfile for your local setup only? |
Not sure if I'm nitpicking here. Let me know if so. When I do |
OK. I find it unintuitive that user isn't notified about using Just to be clear, I don't mean we address it in this PR. We should do it separately. |
Agree. |
/approve Doing both since lgtm was removed by rebase - #4785 (comment) /override ci/prow/psi-unit-test-mac |
@dharmit: Overrode contexts on behalf of dharmit: ci/prow/psi-unit-test-mac 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. |
[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 |
What type of PR is this?
/kind bug
What does this PR do / why we need it:
change debugport in container if its different from env_info, also added debug command for converted devfiles.
Which issue(s) this PR fixes:
Fixes #4615
PR acceptance criteria:
Unit test
Integration test
Documentation
Update changelog
I have read the test guidelines
How to test changes / Special notes to the reviewer: