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 JENKINS-30785] Generalize some CLI stuff to AbstractItem #2694

Closed
wants to merge 1 commit into from

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck added the needs-more-reviews Complex change, which would benefit from more eyes label Jan 2, 2017
@daniel-beck
Copy link
Member Author

@pjanouse PTAL

@daniel-beck daniel-beck added the needs-comments-resolved Comments in the PR need to be addressed before it can be considered for merging label Jan 3, 2017
@daniel-beck
Copy link
Member Author

grumbles stupid tests…

@daniel-beck daniel-beck self-assigned this Jan 3, 2017
@@ -78,11 +79,10 @@ protected int run() throws Exception {
}

if(job == null) {
// TODO: JENKINS-30785
AbstractProject project = AbstractProject.findNearest(job_s);
AbstractItem project = Items.findNearest(AbstractItem.class, job_s, jenkins);
Copy link
Member

Choose a reason for hiding this comment

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

Why not Item then?

// TODO can this (and its pseudo-override in AbstractProject) share code with GenericItemOptionHandler, used for explicit CLICommand’s rather than CLIMethod’s?
AbstractItem item = Jenkins.getInstance().getItemByFullName(name, AbstractItem.class);
if (item==null) {
AbstractProject project = AbstractProject.findNearest(name);
AbstractItem project = Items.findNearest(AbstractItem.class, name, Jenkins.getInstance());
Copy link
Member

Choose a reason for hiding this comment

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

Uh. IMHO should be reported as a separate bug

@jglick
Copy link
Member

jglick commented May 5, 2017

Will cover the ReloadJobCommand patch in #2874, where I can give it an integration test.

@jglick
Copy link
Member

jglick commented May 5, 2017

Actually nah, I will just merge yours in, looks good to me.

@jglick
Copy link
Member

jglick commented May 19, 2017

GitHub would have automatically marked this as merged if @oleg-nenashev had not squashed commits, losing history of what was actually included.

@jglick jglick closed this May 19, 2017
@oleg-nenashev
Copy link
Member

@jglick Yes, I caused some mess in this case. squashing was not intentional this time since I didn't want to deal with mess in downstream PRs. But yeah, now it's my responsibility to deal with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-comments-resolved Comments in the PR need to be addressed before it can be considered for merging needs-more-reviews Complex change, which would benefit from more eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants