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

Add support for Workflows when loading comment files #682

Closed
wants to merge 5 commits into from

Conversation

nosmo
Copy link

@nosmo nosmo commented Jun 27, 2018

When a job is initiated via the pipeline plugin, the Run object is no longer an instance of Build, it becomes an instance of WorkflowRun. This means that the current logic for finding comment files on remote workers does not find the comment file when using a pipeline. Additionally, WorkflowRuns are more complex objects and they can have multiple associated workspaces.

This PR introduces support for finding the files on the remote workspaces.

This change does not allow for seamless discovery of the files in workspaces if multiple nodes are used, and users will be required to stash and unstash as is appropriate if using remote nodes, but I've included a documentation note to explain this.

@Kentalot
Copy link

Awesome, this is exactly what I was looking for. How do we upvote this?

Kentalot
Kentalot previously approved these changes Sep 13, 2018
final FilePath workspace = ((Build<?, ?>) build).getWorkspace();
final FilePath path = workspace.child(scriptFilePathResolved);
FilePath workspace;
FilePath path;

Choose a reason for hiding this comment

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

looks like these don't need to be declared in the outerscope. it's used within each if block anyway. workspace isn't even used in your if block.

@@ -195,6 +195,25 @@ job('downstreamJob') {
}
```

### Pipeline support

Choose a reason for hiding this comment

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

actually, in the above dsl sample code there is no way to use the comment file. do you know the syntax for this?

Choose a reason for hiding this comment

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

Looks like #637 is needed for dsl.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, it'd be really nice to have this.

@nosmo
Copy link
Author

nosmo commented Sep 27, 2018

My fixes appear to have removed the previous approval, could I get a re-review on this please?

@Kentalot
Copy link

@bjoernhaeuser @samrocketman is this held up because tests are failing?

@samrocketman
Copy link
Member

@Kentalot we generally don’t merge changes which are failing. Let’s say we merge and the change continues to fail, all proposals will fail from that point on. We like to avoid this so do not merge code which fails as a matter of policy.

@Kentalot
Copy link

Yes, I totally understand why you would not merge. I was just wondering if that was the main reason for the hold up. I will probably look into updating this to see if i can fix this and open a new PR then.

@nosmo
Copy link
Author

nosmo commented Oct 31, 2018

I'm not seeing any tests failing locally fwiw, it looks like the Jenkins test is being sent a signal that interrupts it before it finishes:

Running org.jenkinsci.plugins.ghprb.manager.impl.GhprbDefaultBuildManagerTest

Sending interrupt signal to process

The tests do not finish as org.jenkinsci.plugins.ghprb.manager.impl.downstreambuilds.BuildFlowBuildManagerTest does not even have a chance to run.

@Kentalot
Copy link

Then perhaps the tests just need to be retriggered/rerun?

@samrocketman
Copy link
Member

Unfortunately, I don’t have the ability to retrigger tests.

@samrocketman samrocketman self-requested a review November 2, 2018 06:21
@Kentalot
Copy link

Kentalot commented Nov 2, 2018

I guess maybe @nosmo can close and reopen or maybe open a new PR?

@nosmo
Copy link
Author

nosmo commented Nov 20, 2018

Closed and reopened as #720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants