How to debug regexManagers? #20881
Replies: 3 comments 12 replies
-
I fixed the specific bug—my regex was lazy. I still think it'd be worth knowing how to get more verbose info out of Renovate to find out what it's doing with the regex manager. For example, it getting a version of |
Beta Was this translation helpful? Give feedback.
-
+1000 In your case, the log mentions applying regex managers at dbanty/093db02c482add9f7c2fbc89e6b61d93#file-log-txt-L331 and then never mentions it again. I have the same problem with this "beauty": {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"regexManagers": [
{
"description": "Detect all image names of the form 'someNameImage : \"registry/image:tag@sha256:hash\"'",
"fileMatch": ["^vars/globals.groovy"],
"matchStrings": [
"^\\s*\\w+Image\\s*:\\s*\"(?:(?<registryUrl>[^/]+)/)?(?<depName>[^\":@]+)(?::(?<currentValue>[^\"@]+))?(?:@(?<currentDigest>sha256:[^\"]+))?\""
],
"datasourceTemplate": "docker",
"versioningTemplate": "docker"
}
]
} Snippet of the file: def call() {
def ecrHostname = '123456.dkr.ecr.eu-central-x.amazonaws.com'
def dockerHubProxy = 'docker-proxy.some.org'
vars = [
//credentials
bitbucketSsh : 'jenkins-bitbucket-ssh',
bitbucketCreds : 'jenkins-bitbucket-credentials',
helmAgentImage : "${ecrHostname}/shared-tools/helm-agent",
kanikoAgentImage : "${ecrHostname}/shared-tools/kaniko-agent",
renovateConfigValidatorImage : "${dockerHubProxy}/renovate/renovate:slim",
asciidoctorAgentImage : "${dockerHubProxy}/asciidoctor/docker-asciidoctor:latest",
ruleTestImage : "docker-proxy.some.org/asciidoctor/docker-asciidoctor:latest",
// paths
kubeconfig : './',
chartPath : './charts/*',
docsTarget : 'docs/target',
docsSource : './docs/src/main/asciidoc'
]
return vars
} I get, in a
Clearly, the (single) regex manager is being applied to the file -- but then, silently, no dependencies are found. Best I can determine, the regex is syntactically fine and matches the relevant lines. I did the best with the matching groups and properties I could glean from the docs (I have gotten regex managers for image references to work before), but clearly there's a mistake. Sadly, Renovate doesn't tell us what. FWIW, I don't expect registries of the form |
Beta Was this translation helpful? Give feedback.
-
+1 I stumbled across this after trying to debug my own regexManagers configuration and ran into a lot of the exact same issues that @reitzig has already articulated. It would be great if some of these issues that were opened up in response were prioritized. |
Beta Was this translation helpful? Give feedback.
-
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us what version of Renovate you run.
No response
If you're self-hosting Renovate, select which platform you are using.
None
If you're self-hosting Renovate, tell us what version of the platform you run.
No response
Was this something which used to work for you, and then stopped?
I never saw this working
Wanted end result.
In general, I want to know how to debug a regexManager. When looking at logs on https://app.renovatebot.com, I see no indication that my regexManager was run, nor any error messages about what's wrong with it.
For more info, I want to auto-update a string within my GitHub workflows:
That
version: 0.6.2
defines the version of the tool which should be auto-updated. It is a crate called knope.What you tried so far.
This is my Renovate config:
I've tried several variations on
fileMatch
andmatchStrings
, none seem to give any feedback in the Renovate logs.Relevant debug logs
I haven't found any relevant logs, which is the main problem. I don't even know how to diagnose 😓. Here is a gist containing the full output of one run though: https://gist.github.com/dbanty/093db02c482add9f7c2fbc89e6b61d93
Beta Was this translation helpful? Give feedback.
All reactions