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

fix(deps): update github.com/warrensbox/terraform-switcher digest to d7dfd1b in go.mod #2816

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 19, 2022

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/warrensbox/terraform-switcher require digest 201c8e9 -> d7dfd1b

Configuration

📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner December 19, 2022 00:24
@renovate renovate bot added the dependencies PRs that update a dependency file label Dec 19, 2022
@nitrocode
Copy link
Member

nitrocode commented Dec 19, 2022

This is a bit odd. The terraform-switcher library uses the release branch instead of master branch. This PR is changing from the newer commit in the release branch to the older commit in the master branch...

Is there a way to override a single golang dependency's base branch and only for the terraform-switcher?

https://docs.renovatebot.com/configuration-options/#basebranches

cc: @krrrr38

@nitrocode nitrocode closed this Dec 19, 2022
@renovate
Copy link
Contributor Author

renovate bot commented Dec 19, 2022

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for the github.com/warrensbox/terraform-switcher d7dfd1b update again.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/github.com-warrensbox-terraform-switcher-digest branch December 19, 2022 00:32
@nitrocode nitrocode restored the renovate/github.com-warrensbox-terraform-switcher-digest branch December 19, 2022 02:56
@nitrocode nitrocode reopened this Dec 19, 2022
Copy link
Member

@nitrocode nitrocode left a comment

Choose a reason for hiding this comment

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

See above comment

@krrrr38
Copy link
Contributor

krrrr38 commented Dec 19, 2022

It seems that terraform-switcher has no v prefix tags and use no default branch as latest one. so not works.

image

I just tried other solutions, but not works fine now.

  • baseBranches
    • this setting is renovate works branch. not for package target branch.
  • use regexManager instead gomod
    • I used following diff. I can change go.mod diff, but not works postUpdateOptions: ["gomodTidy"]. so not changed go.sum.
      • image
use regexManager instead gomod diff example
diff --git a/go.mod b/go.mod
index cabe6d01..651284cd 100644
--- a/go.mod
+++ b/go.mod
@@ -39,3 +39,4 @@ require (
 	github.com/stretchr/testify v1.8.1
 	github.com/urfave/cli v1.22.10
 	github.com/urfave/negroni v1.0.0
+	// renovate: datasource=github-releases depName=warrensbox/terraform-switcher
	github.com/warrensbox/terraform-switcher v0.1.1-0.20220704061544-b24be8c19820
 	github.com/xanzy/go-gitlab v0.77.0
 	go.etcd.io/bbolt v1.3.6
 	go.uber.org/zap v1.24.0
diff --git a/renovate.json5 b/renovate.json5
index 6bfffd87..17fa008d 100644
--- a/renovate.json5
+++ b/renovate.json5
@@ -34,20 +34,6 @@
         ":warning: You need to upgrade testing-image conftest firstly, then upgrade other conftest versions for e2e :warning:",
       ],
     },
+    // terraform-switcher use release branch, not default branch
+    // to support it, disable gomod manager and update by regex manager
+    {
+      // terraform-switcher use release branch, not default branch
+      // to support it, disable gomod manager and update by regex manager
+      matchManagers: ["gomod"],
+      matchPackageNames: ["github.com/warrensbox/terraform-switcher"],
+      enabled: false
+    },
   ],
   // https://docs.renovatebot.com/modules/manager/regex/
   regexManagers: [
@@ -83,17 +69,5 @@
       versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}",
       extractVersionTemplate: '^v(?<version>\\d+\\.\\d+\\.\\d+)',
     },
+    {
+      // some go module cannot handle by gomod manager
+      // - github.com/warrensbox/terraform-switcher use release branch, not default branch
+      fileMatch: ["go.mod$"],
+      matchStrings: [
+        // example:
+        // # renovate: datasource=github-releases depName=hashicorp/terraform versioning=hashicorp
+        // github.com/warrensbox/terraform-switcher vX.X.X-0.000000000-aaaaaaaaaa
+        "renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s.*?github.com/.* (?<currentValue>.*)\\s",
+      ],
+      versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}",
+    },
   ]
 }

Current conclusion: it is better to wait terraform-switcher branch fix. (or someone let me know the other solution)

@nitrocode
Copy link
Member

I like your regexmanager workaround to watch the gh releases instead of the tags. Feel free to propose

@renovate renovate bot force-pushed the renovate/github.com-warrensbox-terraform-switcher-digest branch from 3a2f534 to f9abac3 Compare December 23, 2022 18:00
@renovate renovate bot changed the title fix(deps): update github.com/warrensbox/terraform-switcher digest to 107631f fix(deps): update github.com/warrensbox/terraform-switcher digest to 107631f in go.mod Jan 15, 2023
@renovate renovate bot force-pushed the renovate/github.com-warrensbox-terraform-switcher-digest branch from f9abac3 to f720f72 Compare January 16, 2023 02:50
@renovate renovate bot force-pushed the renovate/github.com-warrensbox-terraform-switcher-digest branch 2 times, most recently from b8a95a6 to 1448f20 Compare January 31, 2023 06:58
@renovate renovate bot changed the title fix(deps): update github.com/warrensbox/terraform-switcher digest to 107631f in go.mod fix(deps): update github.com/warrensbox/terraform-switcher digest to 5a95fbc in go.mod Feb 6, 2023
@renovate renovate bot force-pushed the renovate/github.com-warrensbox-terraform-switcher-digest branch from 1448f20 to 0254c6b Compare February 6, 2023 00:27
@renovate renovate bot changed the title fix(deps): update github.com/warrensbox/terraform-switcher digest to 5a95fbc in go.mod fix(deps): update github.com/warrensbox/terraform-switcher digest to d7dfd1b in go.mod Feb 6, 2023
@renovate renovate bot force-pushed the renovate/github.com-warrensbox-terraform-switcher-digest branch from 0254c6b to 5526b33 Compare February 6, 2023 04:01
@nitrocode nitrocode closed this Feb 8, 2023
@renovate renovate bot deleted the renovate/github.com-warrensbox-terraform-switcher-digest branch February 8, 2023 13:04
@nitrocode nitrocode mentioned this pull request Feb 8, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies PRs that update a dependency file do-not-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants