Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

anmolbabu
Copy link
Contributor

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 in
supervisor.conf

fixes #1066
Signed-off-by: anmolbabu anmolbudugutta@gmail.com

@codeclimate
Copy link

codeclimate bot commented Feb 17, 2019

Code Climate has analyzed commit e352943 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@anmolbabu
Copy link
Contributor Author

redhat-developer/odo-init-image#16 is a close relative of this PR

@AppVeyorBot
Copy link

@codecov
Copy link

codecov bot commented Feb 17, 2019

Codecov Report

Merging #1341 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
pkg/component/component.go 19.27% <0%> (-0.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d82c1ea...e352943. Read the comment docs.

@amitkrout
Copy link
Contributor

amitkrout commented Feb 18, 2019

@anmolbabu I am not sure, is #1341 (comment) a real threat ?

@amitkrout
Copy link
Contributor

@anmolbabu Any thoughts you want to share on decrease in coverage. It looks straight forward to me in component.go file.

Copy link
Contributor

@girishramnani girishramnani left a 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.

Copy link
Member

@kadel kadel left a 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.

@@ -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{})
Copy link
Member

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 👍

Copy link
Contributor Author

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

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)
Copy link
Member

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

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

@kadel kadel added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Mar 14, 2019
@anmolbabu anmolbabu force-pushed the fixes#1066 branch 3 times, most recently from c963000 to d1c3033 Compare April 12, 2019 14:07
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: anmolbabu

If they are not already assigned, you can assign the PR to them by writing /assign @anmolbabu in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@anmolbabu anmolbabu removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Apr 12, 2019
@anmolbabu
Copy link
Contributor Author

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.

@kadel Done Please revisit the PR

@anmolbabu
Copy link
Contributor Author

Tests are expected to fail as long as redhat-developer/odo-init-image#16 is not merged and version bumped

ToDo:

@surajnarwade
Copy link
Contributor

@anmolbabu , code lgtm, tests are failing on travis, I restarted those tests but I think you need to rebase once

@surajnarwade surajnarwade added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Apr 15, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label Apr 15, 2019
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>
@openshift-ci-robot
Copy link
Collaborator

@anmolbabu: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-core fb77124 link /test e2e-core
ci/prow/e2e-scenarios fb77124 link /test e2e-scenarios

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.

@amitkrout
Copy link
Contributor

ping...@girishramnani who is going to address this pr ?

@girishramnani girishramnani self-assigned this May 10, 2019
@girishramnani
Copy link
Contributor

I will take a look at this

@openshift-ci-robot
Copy link
Collaborator

@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.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow. label May 12, 2019
@kadel
Copy link
Member

kadel commented Jun 11, 2019

I will take a look at this

@girishramnani any progress on this?

@amitkrout
Copy link
Contributor

ping @girishramnani

@kadel
Copy link
Member

kadel commented Aug 26, 2019

@girishramnani do we have any progress on this?

@girishramnani
Copy link
Contributor

not yet, busy on the port forward stuff

@girishramnani
Copy link
Contributor

a separate PR was opened and hence closing this PR.

@rm3l rm3l added the estimated-size/M (10-20) Rough sizing for Epics. About 1 sprint of work for one person label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimated-size/M (10-20) Rough sizing for Epics. About 1 sprint of work for one person needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect that component has not been build yet
9 participants