-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
better warning for users when the buildconfig is of type binary #9678
Conversation
@jorgemoralespou fyi. |
@oatmealraisin you may also find this PR of interest. |
|
||
if noSource { | ||
// if we have no source, the user must always provide the source from the local dir(binary build) | ||
fmt.Fprintf(out, " * Use 'start-build --from-dir=DIR' to trigger a new build\n") |
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.
we only mention --from-dir here, but then mention all 3 --from options on the next line - potentially confusion to newbies ?? .... perhaps have the above line not mention any of hte --from options, just the standard use star-build to trigger a new build, but then have the WARNING line below mention you have to pick from 1 of the 3 --from options?
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.
yeah i didn't feel good about any choice i could make there. honestly i wanted to just write "--from-XXXX" but that would be confusing too.
i don't really want to remove it from the start-build command because i think that's a helpful sample and frankly the most common way users will invoke it.
i might just change the warning to tell them to use --from-dir and trust that advanced users will realize there are other options.
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.
@barees or you can list some of the options separated by a pipe. I think this is standard way of showing multiple options.
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.
@jorgemoralespou are you talking about in the warning, or in the example command?
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.
with the options/pipes encompassed with [
]
, sure .... I'm good either with @jorgemoralespou suggestion or @bparees suggestion
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.
pushed an update, let me know what you guys think.
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 unclear imho since that usually means optional. and angle brackets usually mean "substitute this with your value". so i'm not sure what means "pick one of the 3 things here"
@@ -269,7 +269,8 @@ func (r *SourceRepository) RemoteURL() (*url.URL, bool, error) { | |||
if len(ref) > 0 { | |||
remote = fmt.Sprintf("%s#%s", remote, ref) | |||
} | |||
if r.remoteURL, err = url.Parse(remote); err != nil { | |||
|
|||
if r.remoteURL, err = git.ParseRepository(remote); err != nil { |
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 you go ... i had thought either @csrwng or I had made this change in new-app, but nope ... good catch
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 was made in some places but not all, which led to some interesting behavior.
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.
wonder if there were some additions after we made the change ... no matter though at this point
also remove some dead code also properly parse git urls so we recognize when the buildconfig we created really is/isn't binary.
thanks to @oatmealraisin for reminding me i lost track of the original issue i was trying to fix which is to error out when you run start-build for a binary build and don't provide a --from-XXX arg. so removing the "fix" statement from the description. but this warning is still useful and was proposed in the issue. |
[Test]ing while waiting on the merge queue |
docker compose importing appears to be incredibly confused by us properly parsing git urls now:
will need to investigate later. |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5741/) (Image: devenv-rhel7_4513) |
added s2i bump commit which should fix the docker-compose git url parsing problem. |
Evaluated for origin merge up to d283cd2 |
Evaluated for origin test up to d283cd2 |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5740/) |
also remove some dead code
also properly parse git urls so we recognize when the
buildconfig we created really is/isn't binary.
output for binary docker type build:
output for non-binary docker-type build:
output for binary source build:
output for non-binary source build: