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

Incorrect packageRules massaging causes config error #16777

Closed
rarkins opened this issue Jul 26, 2022 · 1 comment · Fixed by #16778
Closed

Incorrect packageRules massaging causes config error #16777

rarkins opened this issue Jul 26, 2022 · 1 comment · Fixed by #16778
Assignees
Labels
core:config Related to config capabilities and presets priority-2-high Bugs impacting wide number of users or very important features type:bug Bug fix of existing functionality

Comments

@rarkins
Copy link
Collaborator

rarkins commented Jul 26, 2022

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

latest/source

Please select which platform you are using if self-hosting.

github.com

If you're self-hosting Renovate, tell us what version of the platform you run.

No response

Was this something which used to work for you, and then stopped?

I never saw this working

Describe the bug

When Renovate attempts to massage packageRules with nested objects, it can sometimes create invalid packageRules.

Reproduction: https://github.com/renovate-reproductions/migrate-nested

Relevant debug logs

Logs
DEBUG: massaged config (repository=renovate-reproductions/migrate-nested)
       "config": {
         "packageRules": [
           {"matchBaseBranches": ["main"]},
           {
             "matchBaseBranches": ["main"],
             "matchUpdateTypes": ["major"],
             "enabled": true
           }
         ]
       }
 WARN: Found renovate config warnings (repository=renovate-reproductions/migrate-nested)
       "warnings": [
         {
           "topic": "Configuration Error",
           "message": "packageRules[0]: Each packageRule must contain at least one non-match* or non-exclude* field. Rule: {\"matchBaseBranches\":[\"main\"]}"
         }
       ]

Have you created a minimal reproduction repository?

I have linked to a minimal reproduction repository in the bug description

@rarkins rarkins added type:bug Bug fix of existing functionality status:requirements Full requirements are not yet known, so implementation should not be started priority-5-triage priority-2-high Bugs impacting wide number of users or very important features core:config Related to config capabilities and presets and removed priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started labels Jul 26, 2022
@rarkins rarkins self-assigned this Jul 26, 2022
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 32.128.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core:config Related to config capabilities and presets 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.

2 participants