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

GitHub-hosted Preset stopped loading #6014

Closed
domeq opened this issue Apr 20, 2020 · 8 comments · Fixed by #6022
Closed

GitHub-hosted Preset stopped loading #6014

domeq opened this issue Apr 20, 2020 · 8 comments · Fixed by #6022
Labels
priority-2-high Bugs impacting wide number of users or very important features type:bug Bug fix of existing functionality

Comments

@domeq
Copy link

domeq commented Apr 20, 2020

Which Renovate are you using?

Renovate Open Source CLI

Which platform are you using?

GitHub.com (preset)

GitHub Enterprise (code)

Have you checked the logs? Don't forget to include them if relevant

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: Limits.init enter method
DEBUG: Limits.init prCommitsPerRunLimit processing
DEBUG: Limits.init prCommitsPerRunLimit variable is not set. Ignoring prCommitsPerRunLimit
 INFO: Repository started (repository=niche-and-services/renovate-bot)
       "renovateVersion": "19.214.0"
DEBUG: Using localDir: /tmp/renovate/repos/github/niche-and-services/renovate-bot (repository=niche-and-services/renovate-bot)
DEBUG: initRepo("niche-and-services/renovate-bot") (repository=niche-and-services/renovate-bot)
DEBUG: Overriding default GitHub endpoint (repository=niche-and-services/renovate-bot)
DEBUG: niche-and-services/renovate-bot owner = niche-and-services (repository=niche-and-services/renovate-bot)
DEBUG: niche-and-services/renovate-bot default branch = master (repository=niche-and-services/renovate-bot)
DEBUG: Using personal access token for git init (repository=niche-and-services/renovate-bot)
DEBUG: Initializing git repository into /tmp/renovate/repos/github/niche-and-services/renovate-bot (repository=niche-and-services/renovate-bot)
DEBUG: git clone completed (repository=niche-and-services/renovate-bot)
       "seconds": 1.3
DEBUG: latest commit (repository=niche-and-services/renovate-bot)
       "latestCommitDate": "2020-04-20 15:05:01 +0200"
DEBUG: No git private key present - commits will be unsigned (repository=niche-and-services/renovate-bot)
DEBUG: Setting git author (repository=niche-and-services/renovate-bot)
       "gitAuthor": {"name": "Renovate bot", "email": "niche-bot@schibsted.com"}
DEBUG: resetMemCache() (repository=niche-and-services/renovate-bot)
DEBUG: detectSemanticCommits() (repository=niche-and-services/renovate-bot)
DEBUG: getCommitMessages (repository=niche-and-services/renovate-bot)
DEBUG: Semantic commits detection: angular (repository=niche-and-services/renovate-bot)
DEBUG: angular semantic commits detected (repository=niche-and-services/renovate-bot)
DEBUG: checkOnboarding() (repository=niche-and-services/renovate-bot)
DEBUG: isOnboarded() (repository=niche-and-services/renovate-bot)
DEBUG: findFile(renovate.json) (repository=niche-and-services/renovate-bot)
DEBUG: config file exists (repository=niche-and-services/renovate-bot)
DEBUG: ensureIssueClosing(Action required: Add a Renovate config) (repository=niche-and-services/renovate-bot)
DEBUG: Retrieving issueList (repository=niche-and-services/renovate-bot)
DEBUG: Retrieved 0 issues (repository=niche-and-services/renovate-bot)
DEBUG: Repo is onboarded (repository=niche-and-services/renovate-bot)
DEBUG: Found renovate.json config file (repository=niche-and-services/renovate-bot)
DEBUG: Repository config (repository=niche-and-services/renovate-bot)
       "configFile": "renovate.json",
       "config": {
         "$schema": "https://docs.renovatebot.com/renovate-schema.json",
         "extends": ["github>Schibsted-Tech-Polska/niche-renovate-config"]
       }
DEBUG: migrateAndValidate() (repository=niche-and-services/renovate-bot)
DEBUG: No config migration necessary (repository=niche-and-services/renovate-bot)
DEBUG: massaged config (repository=niche-and-services/renovate-bot)
       "config": {
         "$schema": "https://docs.renovatebot.com/renovate-schema.json",
         "extends": ["github>Schibsted-Tech-Polska/niche-renovate-config"]
       }
DEBUG: migrated config (repository=niche-and-services/renovate-bot)
       "config": {
         "$schema": "https://docs.renovatebot.com/renovate-schema.json",
         "extends": ["github>Schibsted-Tech-Polska/niche-renovate-config"]
       }
DEBUG: Failed to retrieve default.json from repo (repository=niche-and-services/renovate-bot)
       "statusCode": 404
DEBUG: default.json preset not found - trying renovate.json (repository=niche-and-services/renovate-bot)
DEBUG: Failed to retrieve renovate.json from repo (repository=niche-and-services/renovate-bot)
       "statusCode": 404
DEBUG: Preset fetch error (repository=niche-and-services/renovate-bot)
       "err": {
         "message": "dep not found",
         "stack": "Error: dep not found\n    at fetchJSONFile (/usr/src/app/node_modules/renovate/dist/config/presets/github.js:27:15)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
       }
 INFO: Throwing preset error (repository=niche-and-services/renovate-bot)
 INFO: Repository has invalid config (repository=niche-and-services/renovate-bot)
       "error": {
         "validationError": "Cannot find preset's package (github>Schibsted-Tech-Polska/niche-renovate-config)"
       }
DEBUG: raiseConfigWarningIssue() (repository=niche-and-services/renovate-bot)
DEBUG: getBranchPr(renovate/configure) (repository=niche-and-services/renovate-bot)
DEBUG: findPr(renovate/configure, undefined, open) (repository=niche-and-services/renovate-bot)
DEBUG: Retrieving PR list (repository=niche-and-services/renovate-bot)
DEBUG: Retrieved 14 Pull Requests (repository=niche-and-services/renovate-bot)
DEBUG: ensureIssue(Action Required: Fix Renovate Configuration) (repository=niche-and-services/renovate-bot)
DEBUG: Issues are disabled, so could not create issue: Response code 410 (Gone) (repository=niche-and-services/renovate-bot)
 INFO: Repository finished (repository=niche-and-services/renovate-bot)
DEBUG: Renovate exiting successfully

What would you like to do?

I'm using renovate to watch multiple repos in my organization. To avoid duplicated configs, I'm extending a shared preset available at https://github.com/Schibsted-Tech-Polska/niche-renovate-config and loading it according to docs using the following syntax:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "github>Schibsted-Tech-Polska/niche-renovate-config"
  ]
}

It has been working perfectly until recently when I've started getting the Cannot find preset's package (github>Schibsted-Tech-Polska/niche-renovate-config) errors on every run.

I've found related renovatebot/config-help#347 issue suggesting it happens when github.com is having issues, but it seems to be fine right now according to their status page and I'm getting this error consistently.

Has there been any breaking change related to presets recently?

@rarkins
Copy link
Collaborator

rarkins commented Apr 20, 2020

We added local> presets and that may be related. BTW would it be more convenient to you if you host that shared config on your GitHub Enterprise instead?

@rarkins rarkins transferred this issue from renovatebot/config-help Apr 20, 2020
@rarkins rarkins added type:bug Bug fix of existing functionality priority-2-high Bugs impacting wide number of users or very important features ready labels Apr 20, 2020
@rarkins
Copy link
Collaborator

rarkins commented Apr 20, 2020

Treating this as a regression bug until proven otherwise. FYI @fgreinacher @viceice

@fgreinacher
Copy link
Contributor

fgreinacher commented Apr 20, 2020

I'd guess that behavior is somehow caused by #5973.

@domeq Could you downgrade to something below 19.208.5 (e.g. https://github.com/renovatebot/renovate/releases/tag/19.208.4) and see if the issue remains?

@domeq
Copy link
Author

domeq commented Apr 21, 2020

19.208.4 is still broken for me. The problem shows up in 19.208.0 so when the local> presets support is introduced, 19.207.1 is the last one working fine with Github Enterprise code and github.com preset.

I've switched to using the local> preset and storing it in my Github Enterprise as well - that fixes the job running the latest Renovate version for me.

@fgreinacher
Copy link
Contributor

Thanks for the feedback - took a deeper look at this. It seems that this happens because the github preset incorrectly evaluates the endpoint config option. It should do that only when it's functionality is re-used by the local preset.

https://github.com/renovatebot/renovate/blob/master/lib/config/presets/github.ts#L51

I will take care of a fix!

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 19.216.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@fgreinacher
Copy link
Contributor

@domeq As I don’t have a GH Enterprise at hand could you please see whether this is fixed with 19.216.1?

@domeq
Copy link
Author

domeq commented Apr 22, 2020

Sure thing 👍

Just ran 19.216.1 with my previous configuration (code in GHE, preset in GH) and can confirm it's working just fine again 🎆

Thank you for an awesome response and a fix 👏

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-2-high Bugs impacting wide number of users or very important features type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants