-
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
Fix the problem of attempts to build component w/o source #1341
Conversation
Code Climate has analyzed commit e352943 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
redhat-developer/odo-init-image#16 is a close relative of this PR |
✅ odo build 1629 completed and artifacts can be found here (for commit 2428317725 by @anmolbabu) |
Codecov Report
@@ Coverage Diff @@
## master #1341 +/- ##
==========================================
- Coverage 42.61% 42.55% -0.06%
==========================================
Files 40 40
Lines 5050 5057 +7
==========================================
Hits 2152 2152
- Misses 2683 2690 +7
Partials 215 215
Continue to review full report at Codecov.
|
@anmolbabu I am not sure, is #1341 (comment) a real threat ? |
@anmolbabu Any thoughts you want to share on decrease in coverage. It looks straight forward to me in component.go file. |
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.
would be great to have a reliable regression test for this if possible.
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.
If possible we should split s2i-setup
and run
from setup-and-run
.
Setup could be run only when the container is started, and the Supervisor can just execute run
script without setup.
pkg/component/component.go
Outdated
@@ -452,6 +452,15 @@ func PushLocal(client *occlient.Client, componentName string, applicationName st | |||
} | |||
targetPath := fmt.Sprintf("%s/src", s2iSrcPath) | |||
|
|||
stdin := bytes.NewBuffer([]byte{}) | |||
stdout := bytes.NewBuffer([]byte{}) | |||
stderr := bytes.NewBuffer([]byte{}) |
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.
You can use this instead:
stdin, stdout, stderr := bytes.NewBuffer([]byte{}), bytes.NewBuffer([]byte{}), bytes.NewBuffer([]byte{})
May look a bit nicer 👍
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.
PR modified. Please revisit the PR @cdrage
pkg/component/component.go
Outdated
stdin := bytes.NewBuffer([]byte{}) | ||
stdout := bytes.NewBuffer([]byte{}) | ||
stderr := bytes.NewBuffer([]byte{}) | ||
err = client.ExecCMDInContainer(pod.Name, strings.Split("/var/lib/supervisord/bin/supervisord ctl start run", " "), stdout, stderr, stdin, false) |
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.
This seems super hacky, could we at least move the supervisord path to a constant?
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.
+1
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.
PR modified but principle maintained Please revisit the PR @cdrage @surajnarwade
c963000
to
d1c3033
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: If they are not already assigned, you can assign the PR to them by writing 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 |
@kadel Done Please revisit the PR |
Tests are expected to fail as long as redhat-developer/odo-init-image#16 is not merged and version bumped ToDo:
|
@anmolbabu , code lgtm, tests are failing on travis, I restarted those tests but I think you need to rebase once |
This PR invokes setup script as part of push which sets the stage for push for example at the moment by creating the source dir structure as configured also by the command config in supervisor.conf fixes redhat-developer#1066 Signed-off-by: anmolbabu <anmolbudugutta@gmail.com>
@anmolbabu: The following tests failed, say
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/test-infra repository. I understand the commands that are listed here. |
ping...@girishramnani who is going to address this pr ? |
I will take a look at this |
@anmolbabu: PR needs rebase. 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. |
@girishramnani any progress on this? |
ping @girishramnani |
@girishramnani do we have any progress on this? |
not yet, busy on the port forward stuff |
a separate PR was opened and hence closing this PR. |
This PR starts supervisord as part of push which sets the stage
for push for example at the moment by creating the source dir
structure as configured also by the
command
config insupervisor.conf
fixes #1066
Signed-off-by: anmolbabu anmolbudugutta@gmail.com