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

docs(faq): update Renovate version in example #32054

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

HonkingGoose
Copy link
Collaborator

Changes

  • Update renovateVersion in FAQ example

Context

We're on a new major version of Renovate now. I copied this version from a recent run of Renovate. 😉

Drive by PR, not closing any issue with this.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins
Copy link
Collaborator

rarkins commented Oct 21, 2024

Can we instead add a custom manager for this?

@HonkingGoose
Copy link
Collaborator Author

Can we instead add a custom manager for this?

Maybe... But it's too hard for me to code, or test. 🙃

We have a custom Renovate config, that lets Renovate update "Renovate versions in the docs". This catches most cases, except the renovateVersion I'm updating manually with my own PR.

I thought of two options we can try:

  • Use Docker versions as "close-enough" alias to renovateVersion
  • Publish the current renovateVersion, and use that as source of truth

I did not test any of these solutions in a real run.

Option 1: Use Docker versions as "close-enough" alias to renovateVersion

  1. Update our Renovate config "customManagers" entry.
  2. Make renovateVersion equal, or an alias, to the latest Docker version.

What Renovate should do:

  • In a Markdown file.
  • If you see the string with this pattern: "renovateVersion": "38.120.1", fetch the latest renovatebot/renovate release from Docker.
  • Update the old version with the version from Docker.

Important

The hosted app is usually on a older version. With option 1, the docs may show a renovateVersion that's not the real version of the hosted app.

Option 2: Publish the current renovateVersion, and use that as source of truth

  1. Publish the real renovateVersion somewhere.
  2. Create new "customManagers" entry in our own Renovate config file.

What Renovate should do:

  • In a Markdown file.
  • If you see the string with this pattern: "renovateVersion": "38.120.1", fetch the real renovateVersion from the published source.
  • Replace old version with new version from published source.

Current Renovate config file

Quote from our github/default.json Renovate config file:

  "customManagers": [
    {
      "customType": "regex",
      "description": "Update Renovate and other docker images references in Markdown files",
      "fileMatch": ["\\.md$"],
      "matchStrings": [
        "(?<depName>renovate/renovate):(?<currentValue>[a-z0-9.-]+)(?:@(?<currentDigest>sha256:[a-f0-9]+))?",
        "(?<depName>ghcr.io/renovatebot/renovate):(?<currentValue>[a-z0-9.-]+)(?:@(?<currentDigest>sha256:[a-f0-9]+))?",
        "\\simage: (?<depName>.+?):(?<currentValue>[a-z0-9.-]+)(?:@(?<currentDigest>sha256:[a-f0-9]+))?"
      ],
      "datasourceTemplate": "docker",
      "versioningTemplate": "docker"
    },
    {
      "customType": "regex",
      "description": "Update Github Action references in the Markdown files",
      "fileMatch": ["\\.md$"],
      "matchStrings": [
        "\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentValue>v\\d+\\.\\d+\\.\\d+)",
        "\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentDigest>[a-z0-9]{40}|[a-z0-9]{64}) # tag=(?<currentValue>v\\d+\\.\\d+\\.\\d+)"
      ],
      "datasourceTemplate": "github-tags",
      "versioningTemplate": "semver"
    },

@rarkins
Copy link
Collaborator

rarkins commented Oct 24, 2024

I think that using npm or Docker versions as "close enough" is good enough for us. We won't want to update this all the time either, e.g. we could update this monthly like we do with renovate versions in other docs.

@HonkingGoose
Copy link
Collaborator Author

I think that using npm or Docker versions as "close enough" is good enough for us. We won't want to update this all the time either, e.g. we could update this monthly like we do with renovate versions in other docs.

Sounds good! Here's the issue to track this work:

In the meantime, can you review and merge my manual update? That way we at least show a major version that's current. 😄

@rarkins rarkins added this pull request to the merge queue Oct 25, 2024
Merged via the queue into renovatebot:main with commit d4db4c5 Oct 25, 2024
39 checks passed
@HonkingGoose HonkingGoose deleted the patch-1 branch October 25, 2024 09:52
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 38.131.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants