Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Disable updates for terraform it self does not work #8825

Closed
1 of 5 tasks
Vrtak-CZ opened this issue Feb 23, 2021 · 3 comments
Closed
1 of 5 tasks

Disable updates for terraform it self does not work #8825

Vrtak-CZ opened this issue Feb 23, 2021 · 3 comments

Comments

@Vrtak-CZ
Copy link

Vrtak-CZ commented Feb 23, 2021

What Renovate type, platform and version are you using?

Describe the bug

After this PR #8791 i want to disable it. So I've added this

"packageRules": [
        {
            "matchDepTypes": ["terraform"],
            "enabled": false
        }
    ]

but it still tries to update terraform it self see PR https://github.com/Vrtak-CZ/bug-renovate-terraform/pull/1 And also it disables updates for required_providers with is not intention of this option.

Relevant debug logs

INFO: Repository started
{
  "renovateVersion": "24.62.2"
}
DEBUG: Using localDir: /mnt/renovate/gh/Vrtak-CZ/bug-renovate-terraform
DEBUG: Repository cache not found
{
  "cacheFileName": "/tmp/renovate-cache/renovate/repository/github/Vrtak-CZ/bug-renovate-terraform.json"
}
DEBUG: initRepo("Vrtak-CZ/bug-renovate-terraform")
DEBUG: Overriding default GitHub endpoint
{
  "endpoint": "https://api.github.com/"
}
DEBUG: No dangling containers to remove
DEBUG: Vrtak-CZ/bug-renovate-terraform default branch = master
DEBUG: Using app token for git init
DEBUG: resetMemCache()
DEBUG: checkOnboarding()
DEBUG: isOnboarded()
DEBUG: findFile(renovate.json)
DEBUG: Initializing git repository into /mnt/renovate/gh/Vrtak-CZ/bug-renovate-terraform
DEBUG: git clone completed
{
  "durationMs": 960
}
DEBUG: latest commit
{
  "latestCommitDate": "2021-02-23T12:50:24+01:00"
}
DEBUG: Setting git author name
{
  "gitAuthorName": "Renovate Bot"
}
DEBUG: Setting git author email
{
  "gitAuthorEmail": "bot@renovateapp.com"
}
DEBUG: findFile(renovate.json5)
DEBUG: findFile(.github/renovate.json)
DEBUG: findFile(.github/renovate.json5)
DEBUG: findFile(.gitlab/renovate.json)
DEBUG: findFile(.gitlab/renovate.json5)
DEBUG: findFile(.renovaterc)
DEBUG: findFile(.renovaterc.json)
DEBUG: Config file exists
{
  "fileName": ".renovaterc.json"
}
DEBUG: Retrieving issueList
DEBUG: Retrieved 0 issues
DEBUG: Repo is onboarded
DEBUG: Found .renovaterc.json config file
DEBUG: Repository config
{
  "fileName": ".renovaterc.json",
  "config": {
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "rangeStrategy": "pin",
    "branchPrefix": "renovate-",
    "branchTopic": "update-dependencies",
    "rebaseWhen": "behind-base-branch",
    "recreateClosed": true,
    "schedule": [
      "at any time"
    ],
    "timezone": "Europe/Prague",
    "assignees": [
      "vrtak-cz"
    ],
    "packageRules": [
      {
        "matchDepTypes": [
          "terraform"
        ],
        "enabled": false
      }
    ]
  }
}
DEBUG: migrateAndValidate()
DEBUG: No config migration necessary
DEBUG: massaged config
{
  "config": {
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "rangeStrategy": "pin",
    "branchPrefix": "renovate-",
    "branchTopic": "update-dependencies",
    "rebaseWhen": "behind-base-branch",
    "recreateClosed": true,
    "schedule": [
      "at any time"
    ],
    "timezone": "Europe/Prague",
    "assignees": [
      "vrtak-cz"
    ],
    "packageRules": [
      {
        "matchDepTypes": [
          "terraform"
        ],
        "enabled": false
      }
    ],
    "extends": [
      "github>whitesource/merge-confidence:beta"
    ]
  }
}
DEBUG: migrated config
{
  "config": {
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "rangeStrategy": "pin",
    "branchPrefix": "renovate-",
    "branchTopic": "update-dependencies",
    "rebaseWhen": "behind-base-branch",
    "recreateClosed": true,
    "schedule": [
      "at any time"
    ],
    "timezone": "Europe/Prague",
    "assignees": [
      "vrtak-cz"
    ],
    "packageRules": [
      {
        "matchDepTypes": [
          "terraform"
        ],
        "enabled": false
      }
    ],
    "extends": [
      "github>whitesource/merge-confidence:beta"
    ]
  }
}
DEBUG: Found repo ignorePaths
{
  "ignorePaths": [
    "**/node_modules/**",
    "**/bower_components/**"
  ]
}
DEBUG: detectSemanticCommits()
DEBUG: getCommitMessages
DEBUG: Semantic commits detection: unknown
DEBUG: No semantic commits detected
DEBUG: Setting branchPrefix: renovate-
DEBUG: Cannot read vulnerability alerts
DEBUG: No vulnerability alerts found
DEBUG: processRepo()
DEBUG: No baseBranches
DEBUG: extract()
DEBUG: Setting current branch to master
DEBUG: latest commit
{
  "branchName": "master",
  "latestCommitDate": "2021-02-23T12:50:24+01:00"
}
DEBUG: Using file match: (^|/)tasks/[^/]+\.ya?ml$ for manager ansible
DEBUG: Using file match: (^|/)requirements\.ya?ml$ for manager ansible-galaxy
DEBUG: Using file match: azure.*pipelines?.*\.ya?ml$ for manager azure-pipelines
DEBUG: Using file match: (^|/)batect(-bundle)?\.yml$ for manager batect
DEBUG: Using file match: (^|/)batect$ for manager batect-wrapper
DEBUG: Using file match: (^|/)WORKSPACE(|\.bazel)$ for manager bazel
DEBUG: Using file match: \.bzl$ for manager bazel
DEBUG: Using file match: buildkite\.ya?ml for manager buildkite
DEBUG: Using file match: \.buildkite/.+\.ya?ml$ for manager buildkite
DEBUG: Using file match: (^|/)Gemfile$ for manager bundler
DEBUG: Using file match: (^|/)Cargo.toml$ for manager cargo
DEBUG: Using file match: (^|/).circleci/config.yml$ for manager circleci
DEBUG: Using file match: (^|/)Podfile$ for manager cocoapods
DEBUG: Using file match: (^|/)([\w-]*)composer.json$ for manager composer
DEBUG: Using file match: (^|/)deps\.edn$ for manager deps-edn
DEBUG: Using file match: (^|/)docker-compose[^/]*\.ya?ml$ for manager docker-compose
DEBUG: Using file match: (^|/|\.)Dockerfile$ for manager dockerfile
DEBUG: Using file match: (^|/)Dockerfile\.[^/]*$ for manager dockerfile
DEBUG: Using file match: (^|/).drone.yml$ for manager droneci
DEBUG: Using file match: (^|/).gitmodules$ for manager git-submodules
DEBUG: Using file match: ^\.github\/workflows\/[^/]+\.ya?ml$ for manager github-actions
DEBUG: Using file match: ^\.gitlab-ci\.yml$ for manager gitlabci
DEBUG: Using file match: ^\.gitlab-ci\.yml$ for manager gitlabci-include
DEBUG: Using file match: (^|/)go.mod$ for manager gomod
DEBUG: Using file match: \.gradle(\.kts)?$ for manager gradle
DEBUG: Using file match: (^|/)gradle.properties$ for manager gradle
DEBUG: Using file match: (^|/)gradle.properties$ for manager gradle-lite
DEBUG: Using file match: \.gradle(\.kts)?$ for manager gradle-lite
DEBUG: Using file match: (^|/)gradle/wrapper/gradle-wrapper.properties$ for manager gradle-wrapper
DEBUG: Using file match: (^|/)requirements\.yaml$ for manager helm-requirements
DEBUG: Using file match: (^|/)values.yaml$ for manager helm-values
DEBUG: Using file match: (^|/)helmfile.yaml$ for manager helmfile
DEBUG: Using file match: (^|/)Chart.yaml$ for manager helmv3
DEBUG: Using file match: ^Formula/[^/]+[.]rb$ for manager homebrew
DEBUG: Using file match: \.html?$ for manager html
DEBUG: Using file match: (^|/)plugins\.txt for manager jenkins
DEBUG: Using file match: (^|/)kustomization\.yaml for manager kustomize
DEBUG: Using file match: (^|/)project\.clj$ for manager leiningen
DEBUG: Using file match: \.pom\.xml$ for manager maven
DEBUG: Using file match: (^|/)pom\.xml$ for manager maven
DEBUG: Using file match: (^|/)package.js$ for manager meteor
DEBUG: Using file match: (^|/)mix\.exs$ for manager mix
DEBUG: Using file match: ^.node-version$ for manager nodenv
DEBUG: Using file match: (^|/)package.json$ for manager npm
DEBUG: Using file match: \.(?:cs|fs|vb)proj$ for manager nuget
DEBUG: Using file match: \.(?:props|targets)$ for manager nuget
DEBUG: Using file match: \.config\/dotnet-tools\.json$ for manager nuget
DEBUG: Using file match: (^|/)\.nvmrc$ for manager nvm
DEBUG: Using file match: (^|/)([\w-]*)requirements.(txt|pip)$ for manager pip_requirements
DEBUG: Using file match: (^|/)setup.py$ for manager pip_setup
DEBUG: Using file match: (^|/)Pipfile$ for manager pipenv
DEBUG: Using file match: (^|/)pyproject\.toml$ for manager poetry
DEBUG: Using file match: (^|/)\.pre-commit-config\.yaml$ for manager pre-commit
DEBUG: Using file match: (^|/)pubspec\.ya?ml$ for manager pub
DEBUG: Using file match: (^|/)\.ruby-version$ for manager ruby-version
DEBUG: Using file match: \.sbt$ for manager sbt
DEBUG: Using file match: project/[^/]*.scala$ for manager sbt
DEBUG: Using file match: (^|/)setup\.cfg$ for manager setup-cfg
DEBUG: Using file match: (^|/)Package\.swift for manager swift
DEBUG: Using file match: \.tf$ for manager terraform
DEBUG: Using file match: (^|/)\.terraform-version$ for manager terraform-version
DEBUG: Using file match: (^|/)terragrunt\.hcl$ for manager terragrunt
DEBUG: Using file match: ^.travis.yml$ for manager travis
DEBUG: Matched 1 file(s) for manager terraform: main.tf
DEBUG: Found terraform package files
DEBUG: Found 1 package file(s)
INFO: Dependency extraction complete
{
  "baseBranch": "master",
  "stats": {
    "managers": {
      "terraform": {
        "fileCount": 1,
        "depCount": 2
      }
    },
    "total": {
      "fileCount": 1,
      "depCount": 2
    }
  }
}
DEBUG: Dependency is disabled (random)(dependency="random")
DEBUG: Package releases lookups complete
{
  "baseBranch": "master"
}
DEBUG: packageFiles with updates
{
  "config": {
    "terraform": [
      {
        "packageFile": "main.tf",
        "deps": [
          {
            "currentValue": ">= 0.14.2, < 0.15.0",
            "lineNumber": 1,
            "datasource": "github-tags",
            "depName": "hashicorp/terraform",
            "extractVersion": "v(?<version>.*)$",
            "depIndex": 0,
            "updates": [
              {
                "updateType": "pin",
                "isPin": true,
                "newValue": "0.14.7",
                "newMajor": 0
              }
            ],
            "warnings": [],
            "sourceUrl": "https://github.com/hashicorp/terraform"
          },
          {
            "currentValue": "3.0.0",
            "depType": "terraform",
            "depName": "random",
            "datasource": "terraform-provider",
            "lookupName": "hashicorp/random",
            "depIndex": 1,
            "updates": [],
            "skipReason": "disabled"
          }
        ]
      }
    ]
  }
}
DEBUG: branchifyUpgrades
DEBUG: Using group branchName template
DEBUG: Dependency hashicorp/terraform is part of group Pin Dependencies
DEBUG: 1 flattened updates found: hashicorp/terraform
DEBUG: Returning 1 branch(es)
DEBUG: config.repoIsOnboarded=true
DEBUG: processRepo()
DEBUG: Processing 1 branch: renovate-pin-dependencies
DEBUG: Calculated maximum PRs remaining this run
{
  "prsRemaining": 99
}
DEBUG: PullRequests limit = 99
DEBUG: Calculated maximum branches remaining this run
{
  "branchesRemaining": 99
}
DEBUG: Branches limit = 99
DEBUG: processBranch with 1 upgrades(branch="renovate-pin-dependencies")
DEBUG: Setting current branch to master(branch="renovate-pin-dependencies")
DEBUG: latest commit(branch="renovate-pin-dependencies")
{
  "branchName": "master",
  "latestCommitDate": "2021-02-23T12:50:24+01:00"
}
DEBUG: getBranchPr(renovate-pin-dependencies)(branch="renovate-pin-dependencies")
DEBUG: findPr(renovate-pin-dependencies, undefined, open)(branch="renovate-pin-dependencies")
DEBUG: Retrieving PR list(branch="renovate-pin-dependencies")
DEBUG: Retrieved 0 Pull Requests(branch="renovate-pin-dependencies")
DEBUG: branchExists=false(branch="renovate-pin-dependencies")
DEBUG: Branch has 1 upgrade(s)(branch="renovate-pin-dependencies")
DEBUG: recreateClosed is true(branch="renovate-pin-dependencies")
DEBUG: Checking schedule(at any time, Europe/Prague)(branch="renovate-pin-dependencies")
DEBUG: No schedule defined(branch="renovate-pin-dependencies")
DEBUG: Branch needs creating(branch="renovate-pin-dependencies")
DEBUG: Using reuseExistingBranch: false(branch="renovate-pin-dependencies")
DEBUG: manager.getUpdatedPackageFiles()(branch="renovate-pin-dependencies")
{
  "reuseExistingBranch": false,
  "branchName": "renovate-pin-dependencies"
}
DEBUG: Starting search at index 34(packageFile="main.tf", branch="renovate-pin-dependencies")
{
  "depName": "hashicorp/terraform"
}
DEBUG: Found match at index 34(packageFile="main.tf", branch="renovate-pin-dependencies")
{
  "depName": "hashicorp/terraform"
}
DEBUG: Contents updated(packageFile="main.tf", branch="renovate-pin-dependencies")
{
  "depName": "hashicorp/terraform"
}
DEBUG: Updated 1 package files(branch="renovate-pin-dependencies")
DEBUG: No updated lock files in branch(branch="renovate-pin-dependencies")
DEBUG: 1 file(s) to commit(branch="renovate-pin-dependencies")
DEBUG: Committing files to branch renovate-pin-dependencies(branch="renovate-pin-dependencies")
INFO: Branch created(branch="renovate-pin-dependencies")
{
  "commitSha": "c95f74b"
}
DEBUG: Ensuring PR(branch="renovate-pin-dependencies")
DEBUG: There are 0 errors and 0 warnings(branch="renovate-pin-dependencies")
DEBUG: getBranchPr(renovate-pin-dependencies)(branch="renovate-pin-dependencies")
DEBUG: findPr(renovate-pin-dependencies, undefined, open)(branch="renovate-pin-dependencies")
DEBUG: Creating PR(branch="renovate-pin-dependencies")
{
  "prTitle": "Pin Terraform hashicorp/terraform to 0.14.7"
}
DEBUG: Creating PR(branch="renovate-pin-dependencies")
{
  "title": "Pin Terraform hashicorp/terraform to 0.14.7",
  "head": "Vrtak-CZ:renovate-pin-dependencies",
  "base": "master",
  "draft": false
}
DEBUG: PR created(branch="renovate-pin-dependencies")
{
  "pr": 1,
  "draft": false
}
DEBUG: Adding labels '' to #1(branch="renovate-pin-dependencies")
INFO: PR created(branch="renovate-pin-dependencies")
{
  "pr": 1,
  "prTitle": "Pin Terraform hashicorp/terraform to 0.14.7"
}
DEBUG: Adding assignees 'vrtak-cz' to #1(branch="renovate-pin-dependencies")
DEBUG: Added assignees(branch="renovate-pin-dependencies")
{
  "assignees": [
    "vrtak-cz"
  ]
}
DEBUG: Created Pull Request #1(branch="renovate-pin-dependencies")
DEBUG: Checking #1 for automerge(branch="renovate-pin-dependencies")
{
  "automerge": false,
  "automergeType": "pr",
  "automergeComment": "automergeComment"
}
DEBUG: No automerge(branch="renovate-pin-dependencies")
DEBUG: getBranchPr(renovate-pin-dependencies)
DEBUG: findPr(renovate-pin-dependencies, undefined, open)
DEBUG: Found PR #1
DEBUG: Returning from graphql open PR list
DEBUG: Removing any stale branches
DEBUG: config.repoIsOnboarded=true
DEBUG: Branch lists
{
  "branchList": [
    "renovate-pin-dependencies"
  ],
  "renovateBranches": [
    "renovate-pin-dependencies"
  ]
}
DEBUG: remainingBranches=
DEBUG: No branches to clean up
DEBUG: Repository timing splits (milliseconds)
{
  "splits": {
    "init": 4203,
    "extract": 1345,
    "lookup": 110,
    "update": 7085
  },
  "total": 13107
}
DEBUG: http statistics
{
  "hostStats": [
    "api.github.com, 8 requests, 321ms request average, 0ms queue average"
  ],
  "totalRequests": 8
}
INFO: Repository finished
{
  "durationMs": 13107
}

Have you created a minimal reproduction repository?

https://github.com/Vrtak-CZ/bug-renovate-terraform

  • This is a really small bug, it does not need a reproduction (think small typo)
  • I have provided a minimal reproduction repository
  • I don't have time for that, but it happens in a public repository I have linked to
  • I don't have time for that, and cannot share my private repository
  • The nature of this bug means it's impossible to reproduce publicly

Additional context

@Vrtak-CZ
Copy link
Author

Expected behaviour is do not touch required_version but update (pin) required_providers

@Vrtak-CZ
Copy link
Author

Vrtak-CZ commented Feb 23, 2021

Looks like hashicorp/random has depType terraform instead of required_providers (https://github.com/renovatebot/renovate/blob/master/lib/manager/terraform/util.ts#L62) and terraform it self has no depType instead of terraform (https://github.com/renovatebot/renovate/blob/master/lib/manager/terraform/util.ts#L68)

@secustor
Copy link
Collaborator

There is an issue which disscuses a change regarding the depTypes in the Terraform manager.
#8792 would allow you to deactivate this updates.

@viceice viceice closed this as completed Feb 23, 2021
@renovatebot renovatebot locked and limited conversation to collaborators Feb 23, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants