jenkins-infra / kubernetes-management

Jenkins Infrastructure Kubernetes Management
MIT License
56 stars 46 forks source link

privatek8s (infra.ci.jenkins.io) JDK tools installation are not tracked by `updatecli` #4630

Open dduportal opened 1 year ago

dduportal commented 1 year ago

While working on https://github.com/jenkins-infra/kubernetes-management/pull/4629, it appearead that the JDK tool installation versions are not tracked by updatecli

sarathchandra24 commented 8 months ago

Hello,

I checked the update cli: tools-jdk21.yaml there is problem with the regex as per my knowledge.

Current expected pattern is "^jdk-21.(\d).(\d).(\d)+(\d)$" - which would expect there digits separated by '.' eg: jdk-21.0.2.9+13

but the releases are made jdk-21.0.2+13 which would have the following pattern "^jdk-21.(\d).(\d).(\d)+(\d)$"

I believe this might be the reason which updatecli is not tracking. I verified it in here https://regex101.com/

The following action is also commented which would not raise a pull request as per updatecli docs.

actions:
  default:
    kind: github/pullrequest
    scmid: default
    title: Bump JDK21 version (Jenkins tools) on all controllers to {{ source "lastVersion" }}
    spec:
      labels:
        - dependencies
        - jdk21

Let me know if this issue talks about the same, I can create a PR.

dduportal commented 8 months ago

Yes please ! That would really be helpful!

Please note that the JDK version can be cumbersome : can’t remember but there are different schemes (3 or 4 digits, etc.)

sarathchandra24 commented 8 months ago

Yes you are right!

I could see the following release: jdk-21.0.2+13 jdk-21+35 jdk-21.0.1+12 jdk21u-2024-02-07-08-08-beta

I am thinking only to include these with regex (dk-21.0.2+13, jdk-21+35, jdk-21.0.1+12, jdk-21.0.22+7.1) and ignore the rest, by this the regex looks like this ^jdk-21..(\d)+(\d*)$

dduportal commented 8 months ago

Ping @lemeurherve @smerle33 @poddingue @timja WDYT about this proposal?

Additionally, we should try to use the same regex between https://github.com/jenkins-infra/jenkins-infra/tree/production/updatecli/weekly.d and here (at least)

timja commented 8 months ago

🤷 it'll work till some other version format comes up, to fix it properly the API needs to be used: https://github.com/updatecli/updatecli/issues/1733