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 updatecli for plugins #1063

Merged
merged 9 commits into from
Apr 23, 2022
Merged

add updatecli for plugins #1063

merged 9 commits into from
Apr 23, 2022

Conversation

jetersen
Copy link
Member

fixes #1019

This will find the latest Jenkins version matching the x.xx.x and check each plugin in the specified pom.xml

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@jetersen jetersen requested a review from jglick April 23, 2022 11:18
@jetersen
Copy link
Member Author

Okay not sure why it reports: bash: ./updatecli/updatecli.d/update-plugins.sh: No such file or directory

I had the same issue locally but I can't figure out why it is not able to see the shell scripts 🤔

@jetersen
Copy link
Member Author

jetersen commented Apr 23, 2022

Tested locally with changed values.yaml

diff --git a/updatecli/values.yaml b/updatecli/values.yaml
index ac89ff5..12022d4 100644
--- a/updatecli/values.yaml
+++ b/updatecli/values.yaml
@@ -3,6 +3,6 @@ github:
   email: "41898282+github-actions[bot]@users.noreply.github.com"
   username: "github-actions"
   token: "UPDATECLI_GITHUB_TOKEN"
-  owner: "jenkinsci"
-  repository: "bom"
-  branch: "master"
\ No newline at end of file
+  owner: "jetersen"
+  repository: "jenkins-bom"
+  branch: "fix/bomPlugins"

@jetersen
Copy link
Member Author

jetersen commented Apr 23, 2022

locally bash/powershell scripts works as intended

however having updatecli run the scripts it messes with the standard out of java cli inside powershell

--debug shows that it cannot find my java cli 😕

@jetersen
Copy link
Member Author

updatecli/updatecli.d/update-plugins.ps1 Outdated Show resolved Hide resolved
updatecli/values.yaml Outdated Show resolved Hide resolved
Comment on lines +135 to +138
- jenkins2.289.x
- jenkins2.303.x
- jenkins2.319.x
- jenkins2.332.x
Copy link
Member Author

@jetersen jetersen Apr 23, 2022

Choose a reason for hiding this comment

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

we can do one big PR for all boms or multiple PRs for each bom.

Does it matter @timja @basil @jglick ?

Copy link
Member

Choose a reason for hiding this comment

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

You mean when a given plugin gets updates for multiple LTS lines? I think it is fine for those to be separate PRs, since this is not the normal case. A plugin will only be mentioned in a bom-2.*.x/pom.xml when it is overridden there relative to the newer lines, so when Jenkins baselines are updated across more than one LTS bump in a given plugin release, we would only be adding one such entry.

@jetersen
Copy link
Member Author

Lets try it, we can always modify it 😄

@jetersen jetersen enabled auto-merge (squash) April 23, 2022 18:13
@jetersen jetersen merged commit 6a405f9 into jenkinsci:master Apr 23, 2022
@basil
Copy link
Member

basil commented Apr 23, 2022

But why is this needed if Dependabot is already proposing PRs for these dependencies?

@jetersen
Copy link
Member Author

jetersen commented Apr 24, 2022

Dependabot was not doing for all of them @basil only once where version number was appended to like credentials 2.6.1 to 2.6.1.1 but not for junit 1.53 to 1.54

@jetersen jetersen deleted the fix/bomPlugins branch April 24, 2022 04:48
@basil
Copy link
Member

basil commented Apr 24, 2022

Dependabot was not doing for all of them

Sounds like a bug then, with this PR being a workaround for that bug. But better would be to determine the root cause and fix the original bug.

@jetersen
Copy link
Member Author

Well again another problem is that dependabot does not understand the plugin version in relation to the Jenkins version. This fix uses plugin manager to update dependency according to Jenkins version for the certain BOM lines.

@basil
Copy link
Member

basil commented Apr 24, 2022

That problem also applies to the plugins in bom-weekly, so if we believe that problem is significant enough to develop a custom solution for non-weekly BOM lines, then by the same logic that problem is significant enough to develop a custom solution for bom-weekly.

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Do not understand how all of it works, but looks good. Thanks!

branch: "{{ .github.branch }}"

sources:
jenkins2.289.x:
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this file needs to be maintained when adding or removing lines. Would you mind adding a note to https://github.com/jenkinsci/bom/#lts-lines to this effect?

Comment on lines +135 to +138
- jenkins2.289.x
- jenkins2.303.x
- jenkins2.319.x
- jenkins2.332.x
Copy link
Member

Choose a reason for hiding this comment

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

You mean when a given plugin gets updates for multiple LTS lines? I think it is fine for those to be separate PRs, since this is not the normal case. A plugin will only be mentioned in a bom-2.*.x/pom.xml when it is overridden there relative to the newer lines, so when Jenkins baselines are updated across more than one LTS bump in a given plugin release, we would only be adding one such entry.

@jglick
Copy link
Member

jglick commented Oct 31, 2022

@jetersen this is pretty broken—it keeps on filing PRs for the same updates we do not want; unlike Dependabot it does not remember that a given update was rejected. Unfortunately my knowledge of all this is very limited and I could not figure out how to cleanly disable just the plugin updates without the core updates.

@jetersen
Copy link
Member Author

jetersen commented Oct 31, 2022

@jglick I am unsure why these updates incorrect? 🤔

https://github.com/jenkinsci/pipeline-input-step-plugin/blob/d8a957db5be95ddfbf81f41a60b2f034000314b5/pom.xml#L41

Seems fine to me 😕

https://github.com/jenkinsci/bom/blob/master/updatecli/update-plugin.ps1
You/we can introduce a plugin block list here or plugin/version block list 😅

@timja
Copy link
Member

timja commented Oct 31, 2022

I think it's this issue, #1507 (comment)

Could just drop the line anyway

@jglick
Copy link
Member

jglick commented Oct 31, 2022

I think it's this issue

Right.

Could just drop the line anyway

Probably could; it has so many overrides at this point I am not sure there is much point in publishing new BOM releases, especially when we have a new line arriving (I hope) shortly.

introduce a plugin block list here or plugin/version block list

Also an option. (For Dependabot you have this option in the YAML config but you can also just close a PR to reject a given update.) Probably beyond my Powershell skills.

@jetersen
Copy link
Member Author

We can have it read a YAML config as well.

We can also decide to turn off plugin updates for certain BOM lines when decided 🤔

@timja timja mentioned this pull request Nov 1, 2022
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.

Keep pinned dependencies in 2.nnn.x/pom.xml up to date
4 participants