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

Error configuring GitLab CI_REGISTRY setting using registryAliases #17963

Closed
dandn opened this issue Sep 25, 2022 · 8 comments · Fixed by #22815
Closed

Error configuring GitLab CI_REGISTRY setting using registryAliases #17963

dandn opened this issue Sep 25, 2022 · 8 comments · Fixed by #22815
Assignees
Labels
core:config Related to config capabilities and presets priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality

Comments

@dandn
Copy link

dandn commented Sep 25, 2022

How are you running Renovate?

Self-hosted

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

whitesource/renovate-on-prem v2.5.1 (renovate 32.185.3)

If you're self-hosting Renovate, select which platform you are using.

GitLab self-hosted

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

GitLab EE

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

I never saw this working

Describe the bug

As initially discussed here.

I'm having an issue configuring CI_REGISTRY following the documentation here.

For a given GitLab repo I attempted to add a registryAliases entry by updating the renovate.json file as follows:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "dependencyDashboard": true,
  "registryAliases": {
    "$CI_REGISTRY": "docker-registry.mycompany.net"
  }
}

This approach does not work as I get the following Action Required: Fix Renovate Configuration generated under GitLab issues:

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid 'registryAliases.registryAliases.$CI_REGISTRY' configuration: value is not a url

As mentioned in the initial discussion, it's expecting the URL to be in format https://...... That validation might be too strict. E.g. in my example above, using https://docker-registry.mycompany.net will not generate the renovate error.
However, prepending the https results in incorrectly formatted docker images.

Perhaps there is an expectation that this setting belongs exclusively in config.js? In this case, a documentation fix seems in order.

Maybe the code needs to be modified to properly handle a CI_REGISTRY assignment?

Relevant debug logs

Logs

Have you created a minimal reproduction repository?

No reproduction repository

@dandn dandn added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Sep 25, 2022
@bitnik
Copy link

bitnik commented Sep 28, 2022

We had the same problem today. Adding registryAliases into config.js solves the issue and renovate runs through. But renovate-config-validator still fails with the same error ("value is not a url") even it is configured in config.js.

@rarkins
Copy link
Collaborator

rarkins commented Oct 3, 2022

Workaround is to put them in config.js as noted by @bitnik. I guess we may need to loosen our validation for registryAliases as the longer term solution.

@rarkins rarkins added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:ready 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 Oct 3, 2022
@benedikt-bartscher

This comment was marked as off-topic.

@rarkins rarkins added the auto:reproduction A minimal reproduction is necessary to proceed label Apr 21, 2023
@github-actions
Copy link
Contributor

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

@rarkins rarkins added status:requirements Full requirements are not yet known, so implementation should not be started and removed status:ready labels Apr 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2023

When a bug has been marked as needing a reproduction, it means nobody can work on it until one is provided. In cases where no reproduction is possible, or the issue creator does not have the time to reproduce, we unfortunately need to close such issues as they are non-actionable and serve no benefit by remaining open. This issue will be closed after 7 days of inactivity.

@github-actions github-actions bot added the stale label May 6, 2023
@PatrickSpies
Copy link

Minimal reproduction: https://github.com/PatrickSpies/renovate-17963

@rarkins rarkins added reproduction:provided and removed auto:reproduction A minimal reproduction is necessary to proceed labels May 8, 2023
@rarkins
Copy link
Collaborator

rarkins commented May 8, 2023

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

@viceice viceice self-assigned this Jun 16, 2023
@viceice viceice added status:in-progress Someone is working on implementation and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Jun 16, 2023
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 35.122.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2023
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-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants