-
Notifications
You must be signed in to change notification settings - Fork 73
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
[JENKINS-38669] (1/3) FlowDefinition.getSCMs
#111
Conversation
Will anyone comment anything on that? |
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.
Thanks! I think something like this would be fine, but I'd like to see the rest of the PRs to make sure everything works together, and I'd like to see a bit of Javadoc for a new public API.
To create PRs that can use this code without it being merged, you can use the incremental build of this PR, which can be seen here. You can use this build in other plugins by depending on workflow-api:2.38-rc974.2eb15c40fbf9
, and then file a PR that depends on that version, and so on, so that we can see everything linked together along with an integration test in workflow-job
or git
that shows that the issue has been fixed.
@AngryGami You only need to bump the versions in the PR where you got the upper bounds enforcer error, not in this PR or in workflow-cps. |
Dependencies in workflow-job are and were up to date. You can check yourself: |
@AngryGami No, the latest versions of workflow-step-api and script-security mentioned in the upper bounds errors are workflow-step-api:2.21 and script-security:1.63, and as of your PR, workflow-job is using 2.20 and 1.62, so they need to be updated. Updating the dependencies here fails because workflow-step-api:2.20 depends on structs:1.18, but right now this plugin only depends on structs:1.17. (This might also affect workflow-job once you fix the first two errors) Upper bounds dependencies errors just mean that the current artifact has a version requirement on a dependency that is older than a transitive version requirement on that same dependency, or conflicting transitive version requirements. In all cases, you just need to update the direct version requirement to be the most recent version mentioned in all of the conflicts, or newer. |
Ah.. this is not obvious that enforcer need version bigger that it barks about. Ok. |
Yes, for an error like this:
You have to look through and find the most recent version from all of the conflicts, it's not necessarily the first version listed. This all assumes that the most recent version is backwards-compatible and you can update successfully, and for Jenkins plugins that should be the case most of the time. |
But again, there's not really any need to update workflow-step-api, script-security, or structs here, although assuming they don't require Jenkins core updates or anything, it should be harmless. |
But build failed? How can I ignore that? |
Yeah, the workflow-job PR build failed, so you need to go update dependencies in that PR. The build for this PR was fine as of eb77dfc, it only started failing when you updated the other dependencies, so you could revert those updates instead of updating them and fixing all of the resulting upper bounds issues. |
I don't understand how and what I need to revert? And how this would help? As far as I understand changes from my PR get applied to latest state of master branch of main repository right before build and if I haven't touched anything related to versions how these become out of sync and fail build? Assuming that state of main repo is always buildable. |
Here is what I mean, looking at the commits in this PR in order:
What I meant is that the dependency updates in e290ec5 and 4832389 are unrelated to this PR, and do not do anything to help the workflow-job PR build pass, so you could revert those commits. You don't necessarily have to, since they are harmless, but they are not related to the changes you are trying to make. You can tell that these commits are unrelated to helping the workflow-job PR pass, because you are still using the incremental build based on commit 2eb15c4 in that PR (the version is
You did change something related to versions: you updated dependencies. |
I understand that my hasty fixes to dependencies are irrelevant to meat of this and other two PRs. I would prefer to get rid of them if possible even that they are harmless but I don't know how.
Could you please show me where? |
Ah ok, sorry, I will try to clarify. Here are the paths to the relevant dependencies from workflow-job (you can use master
So on PR 147
So in your PR, you updated workflow-cps to an incremental release based on 2.77+your PR, but To fix it, all you have to do is update your workflow-job PR so that the shortest paths to workflow-step-api and script-security use either newer versions or the same versions out of all paths to the dependencies (which you already did). In general, upper bounds errors are annoying, but pretty common in Jenkins where a lot of plugins have the same dependencies and/or depend on each other for testing purposes. |
Ok, I see now. Though was there any way to avoid that? I mean, how on earth I would have known that workflow-cps master branch is not compatible (meaning from enforcer checker point of view) with workflow-job master branch? Should then I have used some other branch of workflow-cps to start my PR from? |
No, what you did was the right thing to do. I think the problem in this case is just that the upper bounds error message is very technical, and looks like something really bad has happened, when really it is a super common situation, and the error should probably say something more helpful like:
|
Thank you. This is enough information :) |
@AngryGami Sorry for letting this fall through the cracks. Thanks for the PR, I'll be merging the downstream soon. |
FlowDefinition.getSCMs
Please see https://issues.jenkins-ci.org/browse/JENKINS-38669 for explanation
Downstream PRs:
CpsScmFlowDefinition.getSCMs
workflow-cps-plugin#341FlowDefinition.getSCMs
workflow-job-plugin#147