Open AKorezin opened 2 years ago
Does it still extract other dependencies, or does the presence of an empty file cause all extraction to fail? And what do you expect instead as behavior?
The main problem here that the bot creates message in the issue.
These problems occurred while renovating this repository.
- WARN: Error extracting GitLab CI includes
So the expected behavior should be no warning about empty files like with gitlabci
manager.
I have never tried to use gitlabci-include
dependencies. So I'll try to do that.
Just done some testing. It seems that overall version extraction by gitlabci-include
is not broken, if one of the files is empty.
I think we need a null check to fix that warning. Empty files shouldn't be a warning.
Hi there,
Get your issue fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible.
Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this.
To get started, please read our guide on creating a minimal reproduction.
We may close the issue if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment.
Good luck,
The Renovate team
I've checked provided repository, and it still has problems.
The URL is the same https://gitlab.com/AKorezin/renovate-issue-12529.
Here's a new log with renovate/renovate:35.55.1-slim
.
Repo not found. Please import it to a public repo on github.com
Oh, I'm sorry. For some reason, the repo was private. Do I still have to import it to GitHub?
Yes please, otherwise we can't fork it
Here you are https://github.com/AKorezin/renovate-issue-12529
Reproduction forked to https://github.com/renovate-reproductions/12529
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us what version of Renovate you run.
29.2.0
Please select which platform you are using if self-hosting.
gitlab.com
If you're self-hosting Renovate, tell us what version of the platform you run.
14.5.0-pre
Describe the bug
Since renovate version 28.15.0
gitlabci-include
is enabled for all**.gitlab-ci.yml
because of #12380.But this manager fails if
.gitlab-ci.yml
file is invalid, empty or the content of the file is commented.I created a sample repository.
Relevant debug logs
Logs
``` DEBUG: Using RE2 as regex engine DEBUG: Parsing configs DEBUG: Checking for config file in /usr/src/app/config DEBUG: No config file found on disk - skipping DEBUG: File config "config": {} DEBUG: CLI config "config": {"repositories": ["AKorezin/renovate-issue-12529"]} DEBUG: Env config "config": { "hostRules": [], "binarySource": "docker", "platform": "gitlab", "token": "***********" } DEBUG: Combined config "config": { "hostRules": [], "binarySource": "docker", "platform": "gitlab", "token": "***********", "repositories": ["AKorezin/renovate-issue-12529"] } DEBUG: Using default GitLab endpoint: https://gitlab.com/api/v4/ DEBUG: GitLab version is: 14.5.0-pre DEBUG: Using platform gitAuthor: AKorezin Renovate <***@***> DEBUG: Adding token authentication for gitlab.com to hostRules DEBUG: Using baseDir: /tmp/renovate DEBUG: Using cacheDir: /tmp/renovate/cache DEBUG: Initializing Renovate internal cache into /tmp/renovate/cache/renovate/renovate-cache-v1 DEBUG: Commits limit = null DEBUG: Clearing hostRules DEBUG: Adding token authentication for gitlab.com to hostRules INFO: No docker daemon found INFO: Repository started (repository=AKorezin/renovate-issue-12529) "renovateVersion": "29.2.0" DEBUG: Using localDir: /tmp/renovate/repos/gitlab/AKorezin/renovate-issue-12529 (repository=AKorezin/renovate-issue-12529) DEBUG: AKorezin/renovate-issue-12529 default branch = main (repository=AKorezin/renovate-issue-12529) DEBUG: Enabling Git FS (repository=AKorezin/renovate-issue-12529) DEBUG: using http URL (repository=AKorezin/renovate-issue-12529) "url": "https://gitlab.com/AKorezin/renovate-issue-12529.git" DEBUG: resetMemCache() (repository=AKorezin/renovate-issue-12529) DEBUG: Resetting npmrc (repository=AKorezin/renovate-issue-12529) DEBUG: detectSemanticCommits() (repository=AKorezin/renovate-issue-12529) DEBUG: Initializing git repository into /tmp/renovate/repos/gitlab/AKorezin/renovate-issue-12529 (repository=AKorezin/renovate-issue-12529) DEBUG: Performing blobless clone (repository=AKorezin/renovate-issue-12529) DEBUG: git clone completed (repository=AKorezin/renovate-issue-12529) "durationMs": 2228 DEBUG: latest repository commit (repository=AKorezin/renovate-issue-12529) "latestCommit": { "hash": "f81fd1176b11ec90b38f4b9a9ffaf066a4c8648c", "date": "2021-11-06T11:25:22+03:00", "message": "Debug", "refs": "HEAD -> main, origin/main, origin/HEAD", "body": "", "author_name": "AKorezin", "author_email": "3751653-AKorezin@users.noreply.gitlab.com" } DEBUG: getCommitMessages (repository=AKorezin/renovate-issue-12529) DEBUG: Semantic commits detection: unknown (repository=AKorezin/renovate-issue-12529) DEBUG: No semantic commits detected (repository=AKorezin/renovate-issue-12529) DEBUG: checkOnboarding() (repository=AKorezin/renovate-issue-12529) DEBUG: isOnboarded() (repository=AKorezin/renovate-issue-12529) DEBUG: findFile(renovate.json) (repository=AKorezin/renovate-issue-12529) DEBUG: findFile(renovate.json5) (repository=AKorezin/renovate-issue-12529) DEBUG: findFile(.github/renovate.json) (repository=AKorezin/renovate-issue-12529) DEBUG: findFile(.github/renovate.json5) (repository=AKorezin/renovate-issue-12529) DEBUG: findFile(.gitlab/renovate.json) (repository=AKorezin/renovate-issue-12529) DEBUG: Config file exists (repository=AKorezin/renovate-issue-12529) "fileName": ".gitlab/renovate.json" DEBUG: ensureIssueClosing() (repository=AKorezin/renovate-issue-12529) DEBUG: Repo is onboarded (repository=AKorezin/renovate-issue-12529) DEBUG: Found .gitlab/renovate.json config file (repository=AKorezin/renovate-issue-12529) DEBUG: Repository config (repository=AKorezin/renovate-issue-12529) "fileName": ".gitlab/renovate.json", "config": { "extends": [ "config:base", ":pinAllExceptPeerDependencies", ":dependencyDashboard" ], "pinDigests": true } DEBUG: migrateAndValidate() (repository=AKorezin/renovate-issue-12529) DEBUG: No config migration necessary (repository=AKorezin/renovate-issue-12529) DEBUG: massaged config (repository=AKorezin/renovate-issue-12529) "config": { "extends": [ "config:base", ":pinAllExceptPeerDependencies", ":dependencyDashboard" ], "pinDigests": true } DEBUG: migrated config (repository=AKorezin/renovate-issue-12529) "config": { "extends": [ "config:base", ":pinAllExceptPeerDependencies", ":dependencyDashboard" ], "pinDigests": true } DEBUG: Setting hostRules from config (repository=AKorezin/renovate-issue-12529) DEBUG: Found repo ignorePaths (repository=AKorezin/renovate-issue-12529) "ignorePaths": [ "**/node_modules/**", "**/bower_components/**", "**/vendor/**", "**/examples/**", "**/__tests__/**", "**/test/**", "**/tests/**", "**/__fixtures__/**" ] DEBUG: No vulnerability alerts found (repository=AKorezin/renovate-issue-12529) DEBUG: findIssue(Dependency Dashboard) (repository=AKorezin/renovate-issue-12529) DEBUG: No baseBranches (repository=AKorezin/renovate-issue-12529) DEBUG: extract() (repository=AKorezin/renovate-issue-12529) DEBUG: Setting current branch to main (repository=AKorezin/renovate-issue-12529) DEBUG: latest commit (repository=AKorezin/renovate-issue-12529) "branchName": "main", "latestCommitDate": "2021-11-06T11:25:22+03:00" DEBUG: Using file match: (^|/)tasks/[^/]+\.ya?ml$ for manager ansible (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)requirements\.ya?ml$ for manager ansible-galaxy (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)galaxy\.ya?ml$ for manager ansible-galaxy (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: azure.*pipelines?.*\.ya?ml$ for manager azure-pipelines (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)batect(-bundle)?\.yml$ for manager batect (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)batect$ for manager batect-wrapper (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)WORKSPACE(|\.bazel)$ for manager bazel (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.bzl$ for manager bazel (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)\.?bitbucket-pipelines\.ya?ml$ for manager bitbucket-pipelines (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: buildkite\.ya?ml for manager buildkite (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.buildkite/.+\.ya?ml$ for manager buildkite (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)Gemfile$ for manager bundler (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.cake$ for manager cake (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)Cargo.toml$ for manager cargo (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/).circleci/config.yml$ for manager circleci (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)cloudbuild.ya?ml for manager cloudbuild (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)Podfile$ for manager cocoapods (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)([\w-]*)composer.json$ for manager composer (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)deps\.edn$ for manager deps-edn (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)docker-compose[^/]*\.ya?ml$ for manager docker-compose (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/|\.)Dockerfile$ for manager dockerfile (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)Dockerfile\.[^/]*$ for manager dockerfile (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/).drone.yml$ for manager droneci (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/).gitmodules$ for manager git-submodules (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: ^(workflow-templates|\.github\/workflows)\/[^/]+\.ya?ml$ for manager github-actions (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|\/)action\.ya?ml$ for manager github-actions (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.gitlab-ci\.yml$ for manager gitlabci (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.gitlab-ci\.yml$ for manager gitlabci-include (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)go.mod$ for manager gomod (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.gradle(\.kts)?$ for manager gradle (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|\/)gradle\.properties$ for manager gradle (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|\/)gradle\/.+\.toml$ for manager gradle (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.versions\.toml$ for manager gradle (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)gradle/wrapper/gradle-wrapper.properties$ for manager gradle-wrapper (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)requirements\.yaml$ for manager helm-requirements (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)values.yaml$ for manager helm-values (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)helmfile.yaml$ for manager helmfile (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)Chart.yaml$ for manager helmv3 (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: ^Formula/[^/]+[.]rb$ for manager homebrew (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.html?$ for manager html (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)plugins\.(txt|ya?ml)$ for manager jenkins (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)kustomization\.yaml for manager kustomize (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)project\.clj$ for manager leiningen (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.pom\.xml$ for manager maven (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)pom\.xml$ for manager maven (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)package.js$ for manager meteor (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)mix\.exs$ for manager mix (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/).node-version$ for manager nodenv (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)package.json$ for manager npm (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.(?:cs|fs|vb)proj$ for manager nuget (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.(?:props|targets)$ for manager nuget (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.config\/dotnet-tools\.json$ for manager nuget (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|//)global\.json$ for manager nuget (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)\.nvmrc$ for manager nvm (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)([\w-]*)requirements\.(txt|pip)$ for manager pip_requirements (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)setup.py$ for manager pip_setup (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)Pipfile$ for manager pipenv (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)pyproject\.toml$ for manager poetry (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)\.pre-commit-config\.yaml$ for manager pre-commit (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)pubspec\.ya?ml$ for manager pub (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/).python-version$ for manager pyenv (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)\.ruby-version$ for manager ruby-version (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.sbt$ for manager sbt (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: project/[^/]*.scala$ for manager sbt (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)setup\.cfg$ for manager setup-cfg (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)Package\.swift for manager swift (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: \.tf$ for manager terraform (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)\.terraform-version$ for manager terraform-version (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)terragrunt\.hcl$ for manager terragrunt (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: (^|/)\.terragrunt-version$ for manager terragrunt-version (repository=AKorezin/renovate-issue-12529) DEBUG: Using file match: ^.travis.yml$ for manager travis (repository=AKorezin/renovate-issue-12529) DEBUG: Matched 1 file(s) for manager gitlabci: example/example.gitlab-ci.yml (repository=AKorezin/renovate-issue-12529) DEBUG: Matched 1 file(s) for manager gitlabci-include: example/example.gitlab-ci.yml (repository=AKorezin/renovate-issue-12529) WARN: Error extracting GitLab CI includes (repository=AKorezin/renovate-issue-12529) "err": { "message": "Cannot read property 'include' of null", "stack": "TypeError: Cannot read property 'include' of null\n at Object.extractPackageFile (/usr/src/app/node_modules/renovate/lib/manager/gitlabci-include/extract.ts:43:23)\n at extractPackageFile (/usr/src/app/node_modules/renovate/lib/manager/index.ts:70:9)\n at getManagerPackageFiles (/usr/src/app/node_modules/renovate/lib/workers/repository/extract/manager-files.ts:52:43)\n at /usr/src/app/node_modules/renovate/lib/workers/repository/extract/index.ts:45:28\n at async Promise.all (index 1)\n at extractAllDependencies (/usr/src/app/node_modules/renovate/lib/workers/repository/extract/index.ts:43:26)\n at extract (/usr/src/app/node_modules/renovate/lib/workers/repository/process/extract-update.ts:82:20)\n at extractDependencies (/usr/src/app/node_modules/renovate/lib/workers/repository/process/index.ts:58:26)\n at Object.renovateRepository (/usr/src/app/node_modules/renovate/lib/workers/repository/index.ts:46:52)\n at Object.start (/usr/src/app/node_modules/renovate/lib/workers/global/index.ts:122:7)\n at /usr/src/app/node_modules/renovate/lib/renovate.ts:16:22" } DEBUG: Found 0 package file(s) (repository=AKorezin/renovate-issue-12529) INFO: Dependency extraction complete (repository=AKorezin/renovate-issue-12529) "baseBranch": "main", "stats": {"managers": {}, "total": {"fileCount": 0, "depCount": 0}} DEBUG: Package releases lookups complete (repository=AKorezin/renovate-issue-12529) "baseBranch": "main" DEBUG: branchifyUpgrades (repository=AKorezin/renovate-issue-12529) DEBUG: 0 flattened updates found: (repository=AKorezin/renovate-issue-12529) DEBUG: Returning 0 branch(es) (repository=AKorezin/renovate-issue-12529) DEBUG: config.repoIsOnboarded=true (repository=AKorezin/renovate-issue-12529) DEBUG: packageFiles with updates (repository=AKorezin/renovate-issue-12529) "config": {} DEBUG: processRepo() (repository=AKorezin/renovate-issue-12529) DEBUG: Processing 0 branches: (repository=AKorezin/renovate-issue-12529) DEBUG: Calculating hourly PRs remaining (repository=AKorezin/renovate-issue-12529) DEBUG: currentHourStart=2021-11-06T08:00:00.000+00:00 (repository=AKorezin/renovate-issue-12529) DEBUG: PR hourly limit remaining: 2 (repository=AKorezin/renovate-issue-12529) DEBUG: Calculating prConcurrentLimit (20) (repository=AKorezin/renovate-issue-12529) DEBUG: 0 PRs are currently open (repository=AKorezin/renovate-issue-12529) DEBUG: PR concurrent limit remaining: 20 (repository=AKorezin/renovate-issue-12529) DEBUG: Calculated maximum PRs remaining this run (repository=AKorezin/renovate-issue-12529) "prsRemaining": 2 DEBUG: PullRequests limit = 2 (repository=AKorezin/renovate-issue-12529) DEBUG: Calculating hourly PRs remaining (repository=AKorezin/renovate-issue-12529) DEBUG: currentHourStart=2021-11-06T08:00:00.000+00:00 (repository=AKorezin/renovate-issue-12529) DEBUG: PR hourly limit remaining: 2 (repository=AKorezin/renovate-issue-12529) DEBUG: Calculating branchConcurrentLimit (20) (repository=AKorezin/renovate-issue-12529) DEBUG: 0 already existing branches found: (repository=AKorezin/renovate-issue-12529) DEBUG: Branch concurrent limit remaining: 20 (repository=AKorezin/renovate-issue-12529) DEBUG: Calculated maximum branches remaining this run (repository=AKorezin/renovate-issue-12529) "branchesRemaining": 2 DEBUG: Branches limit = 2 (repository=AKorezin/renovate-issue-12529) DEBUG: Ensuring Dependency Dashboard (repository=AKorezin/renovate-issue-12529) DEBUG: ensureIssue() (repository=AKorezin/renovate-issue-12529) DEBUG: Updating issue (repository=AKorezin/renovate-issue-12529) DEBUG: Removing any stale branches (repository=AKorezin/renovate-issue-12529) DEBUG: config.repoIsOnboarded=true (repository=AKorezin/renovate-issue-12529) DEBUG: No renovate branches found (repository=AKorezin/renovate-issue-12529) DEBUG: ensureIssueClosing() (repository=AKorezin/renovate-issue-12529) DEBUG: Repository timing splits (milliseconds) (repository=AKorezin/renovate-issue-12529) "splits": {"init": 5008, "extract": 641, "lookup": 2, "update": 354}, "total": 6757 DEBUG: http statistics (repository=AKorezin/renovate-issue-12529) "urls": { "https://gitlab.com/api/v4/projects/AKorezin%2Frenovate-issue-12529 (GET)": 1, "https://gitlab.com/api/v4/projects/AKorezin%2Frenovate-issue-12529/issues (GET)": 1, "https://gitlab.com/api/v4/projects/AKorezin%2Frenovate-issue-12529/issues/2 (GET)": 2, "https://gitlab.com/api/v4/projects/AKorezin%2Frenovate-issue-12529/issues/2 (PUT)": 1, "https://gitlab.com/api/v4/projects/AKorezin%2Frenovate-issue-12529/merge_requests (GET)": 1 }, "hostStats": {"gitlab.com": {"requestCount": 6, "requestAvgMs": 359, "queueAvgMs": 0}}, "totalRequests": 6 INFO: Repository finished (repository=AKorezin/renovate-issue-12529) "durationMs": 6757 DEBUG: Renovate exiting ```Have you created a minimal reproduction repository?
I have linked to a minimal reproduction repository in the bug description