-
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
Adds runMode to env for debugging with odo watch. #3597
Adds runMode to env for debugging with odo watch. #3597
Conversation
f03815d
to
21ab076
Compare
pkg/envinfo/envinfo.go
Outdated
type RUNMode string | ||
|
||
const ( | ||
RunMODE RUNMode = "run" | ||
DebugMODE RUNMode = "debug" | ||
) |
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.
it could be simply
type RunMode string
const (
Run RunMode = "run"
Debug RunMode = "run"
)
pkg/envinfo/envinfo.go
Outdated
@@ -37,6 +47,9 @@ const ( | |||
|
|||
// DefaultDebugPort is the default port used for debugging on remote pod | |||
DefaultDebugPort = 5858 | |||
|
|||
// DefaultRunMode is the default run mode of the component | |||
DefaultRunMode = "run" |
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.
use the constant defined above
@adisky Fixed |
d6ceeac
to
442dbbd
Compare
@@ -0,0 +1,7 @@ | |||
package envinfo | |||
|
|||
func GetFakeEnvInfo(settings ComponentSettings) *EnvInfo { |
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.
Can you please add comment what does this function do?
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.
can we keep the fake stuff in _test.go files as they are for testing perposes if I am not wrong?
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.
I tried that but it doesn't work. I think we cannot use functions from _test.go in the main code. I also found this online https://stackoverflow.com/questions/59064256/is-it-possible-to-call-a-test-func-from-another-file-to-start-the-testing
@prietyc123 Fixed |
@mik-dass: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
ebcd26d
to
77aa362
Compare
what about all the |
Codecov Report
@@ Coverage Diff @@
## master #3597 +/- ##
==========================================
- Coverage 45.56% 45.53% -0.03%
==========================================
Files 115 116 +1
Lines 11681 11697 +16
==========================================
+ Hits 5322 5326 +4
- Misses 5841 5853 +12
Partials 518 518
Continue to review full report at Codecov.
|
If runMode is debug, odo watch will trigger push with debug settings else it will trigger normal push. Signed-off-by: mik-dass <mrinald7@gmail.com>
77aa362
to
9e7b138
Compare
Fixed 👍 |
can we have intg test for this as well? |
Already added in the URL |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: girishramnani 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 |
/kind bug
What does does this PR do / why we need it:
If runMode is debug, odo watch will trigger push with debug settings else it will trigger normal push.
Which issue(s) this PR fixes:
Fixes #3480
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
odo push --debug
odo watch
and check if it detects debug mode for pushing files.odo push
and check if it uses normal mode for pushing files.