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

Support kustomize URL parameters #31120

Open
rarkins opened this issue Aug 30, 2024 Discussed in #31064 · 0 comments
Open

Support kustomize URL parameters #31120

rarkins opened this issue Aug 30, 2024 Discussed in #31064 · 0 comments
Labels
manager:kustomize Kustomize manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Aug 30, 2024

Discussed in #31064

Originally posted by lucacome August 28, 2024

What would you like help with?

I think I found a bug

How are you running Renovate?

Mend Renovate hosted app on github.com

If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.

No response

Please tell us more about your question or problem

Remote targets in kustomize support multiple query parameters:

  • ref - a git fetch-able ref, typically a branch, tag, or full commit hash
    (short hashes are not supported)
  • version - same as ref. If ref is provided, this is ignored.
  • timeout (default 27s) - a number in seconds, or a go duration. specifies
    the timeout for fetching the resource
  • submodules (default true) - a boolean specifying whether to clone
    submodules or not

There are a few issues:

  • If any of these parameters are specified in the URL before ref, renovate doesn't work
  • version is not treated as ref
  • if the parameters are after ref, renovate deletes them in the update

Reproduction here https://github.com/lucacome/renovate-kustomize-remote
PR from renovate https://github.com/lucacome/renovate-kustomize-remote/pull/1/files

Logs (if relevant)

Logs
DEBUG: Matched 4 file(s) for manager kustomize: ref-before-timeout/kustomization.yaml, timeout/kustomization.yaml, version/kustomization.yaml, without-timeout/kustomization.yaml
DEBUG: manager extract durations (ms)
{
  "managers": {
    "kustomize": 5
  }
}

DEBUG: Found kustomize package files
DEBUG: Found 2 package file(s)
INFO: Dependency extraction complete
{
  "baseBranch": "main"
  "stats": {
    "managers": {
      "kustomize": {
        "fileCount": 2,
        "depCount": 2
      }
    },
    "total": {
      "fileCount": 2,
      "depCount": 2
    }
  }
}

DEBUG: Found no satisfying versions with 'semver-coerced' versioning
DEBUG: PackageFiles.add() - Package file saved for base branch
{
  "baseBranch": "main"
}

DEBUG: Package releases lookups complete
{
  "baseBranch": "main"
}

DEBUG: branchifyUpgrades
DEBUG: detectSemanticCommits()
DEBUG: getCommitMessages
DEBUG: semanticCommits: detected "unknown"
DEBUG: semanticCommits: disabled
DEBUG: 2 flattened updates found: kubernetes-sigs/gateway-api, kubernetes-sigs/gateway-api
DEBUG: Returning 1 branch(es)
DEBUG: config.repoIsOnboarded=true
DEBUG: packageFiles with updates
{
  "baseBranch": "main"
  "config": {
    "kustomize": [
      {
        "deps": [
          {
            "currentValue": "v1.0.0&timeout=120",
            "datasource": "github-tags",
            "depName": "kubernetes-sigs/gateway-api",
            "depType": "Kustomization",
            "updates": [
              {
                "bucket": "non-major",
                "newVersion": "v1.1.0",
                "newValue": "v1.1.0",
                "releaseTimestamp": "2024-05-08T23:50:37.000Z",
                "newMajor": 1,
                "newMinor": 1,
                "newPatch": 0,
                "updateType": "minor",
                "branchName": "renovate/kubernetes-sigs-gateway-api-1.x"
              }
            ],
            "packageName": "kubernetes-sigs/gateway-api",
            "versioning": "semver-coerced",
            "warnings": [],
            "sourceUrl": "https://github.com/kubernetes-sigs/gateway-api",
            "registryUrl": "https://github.com",
            "currentVersion": "v1.0.0&timeout=120",
            "currentVersionTimestamp": "2023-10-31T16:26:32.000Z",
            "isSingleVersion": true,
            "fixedVersion": "v1.0.0&timeout=120"
          }
        ],
        "packageFile": "ref-before-timeout/kustomization.yaml"
      },
      {
        "deps": [
          {
            "currentValue": "v1.0.0",
            "datasource": "github-tags",
            "depName": "kubernetes-sigs/gateway-api",
            "depType": "Kustomization",
            "updates": [
              {
                "bucket": "non-major",
                "newVersion": "v1.1.0",
                "newValue": "v1.1.0",
                "releaseTimestamp": "2024-05-08T23:50:37.000Z",
                "newMajor": 1,
                "newMinor": 1,
                "newPatch": 0,
                "updateType": "minor",
                "branchName": "renovate/kubernetes-sigs-gateway-api-1.x"
              }
            ],
            "packageName": "kubernetes-sigs/gateway-api",
            "versioning": "semver-coerced",
            "warnings": [],
            "sourceUrl": "https://github.com/kubernetes-sigs/gateway-api",
            "registryUrl": "https://github.com",
            "currentVersion": "v1.0.0",
            "currentVersionTimestamp": "2023-10-31T16:26:32.000Z",
            "isSingleVersion": true,
            "fixedVersion": "v1.0.0"
          }
        ],
        "packageFile": "without-timeout/kustomization.yaml"
      }
    ]
  }
}

Reproduction forked to https://github.com/renovate-reproductions/31064

@rarkins rarkins added type:feature Feature (new functionality) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others manager:kustomize Kustomize manager labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:kustomize Kustomize manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

1 participant