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 updating gitlabci includes if pinDigests=true" #14177

Open
dirkoberhaus opened this issue Feb 11, 2022 · 12 comments
Open

Error updating gitlabci includes if pinDigests=true" #14177

dirkoberhaus opened this issue Feb 11, 2022 · 12 comments
Labels
manager:gitlabci GitLab CI config files priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality

Comments

@dirkoberhaus
Copy link

dirkoberhaus commented Feb 11, 2022

How are you running Renovate?

Self-hosted

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

31.79.1

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

No response

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

Linux (Docker container)

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

It used to work, and then stopped

Describe the bug

We have set "pinDigests": true in our renovate json to pin used docker images in Dockerfile etc.
Since 2-3 Weeks our renovate job logs following errors:

Error updating branch: update failure ....

The expected updates are in .gitlab-ci.yml includes.

We invested some time and it seems that in the function confirmIfDepUpdated
is looking for digests where no digests are supported. For example in .gitlab-ci.yml includes.

Is there a config change we missed or is this a bug?

Relevant debug logs

Logs
{"name":"renovate","hostname":"xxxx","pid":39,"level":40,"logContext":"Go76X9aINXdc1TGggar3U","repository":"xxxx","branch":"renovate/pin-dependencies","msg":"Error updating branch: update failure","time":"2022-02-11T16:18:46.538Z","v":0}

Have you created a minimal reproduction repository?

Example Repository

@dirkoberhaus dirkoberhaus 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 Feb 11, 2022
@rarkins rarkins added the auto:reproduction A minimal reproduction is necessary to proceed label Feb 11, 2022
@github-actions
Copy link
Contributor

Hi there,

Help us by making a minimal reproduction repository.

Before we can start work on your issue we first 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 to understand what is needed.

We may close the issue if you (or someone else) have not provided 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 the auto:logs Issue or Discussion is needs logs/more logs label Feb 11, 2022
@github-actions
Copy link
Contributor

Hi there,

We have found that there's a problem with the logs. Depending on which situation applies follow one, some or all of these instructions.

No logs at all

If there's no log posted yet, we need you to find and copy/paste the log into the issue template.

Finding logs on hosted app

Click me to read instructions

If you use the Renovate app (GitHub):

  1. Go to the affected PR, and search for "View repository job log here"
  2. Click on the link to go to the "WhiteSource Renovate Dashboard" and log in
  3. You are now in the correct repository log overview screen
  4. Copy/paste the correct log
  5. Follow the steps in the formatting your logs section

Finding logs when self-hosting

Click me to read instructions

If you're running self-hosted, run with LOG_LEVEL=debug in your environment variables and search for whatever dependency/branch/PR that is causing the problem.

Insufficient logs

Click me to read instructions

If you already provided logs, and the Renovate team said they are not enough, follow the instructions from the No logs at all section.

Formatting your logs

Click me to read instructions

Please put your logs in a <details> and <summary> element like this:

<details><summary>Click me to see logs</summary>

```
Copy/paste any log here, between the starting and ending backticks
```

</details>

@dirkoberhaus
Copy link
Author

Hi, I've created a minimal repo to reproduce the error:

https://gitlab.com/oberhaus77/renovate-test

Kind regards

@rarkins
Copy link
Collaborator

rarkins commented Feb 15, 2022

Thanks for the reproduction. Forked to https://github.com/renovate-reproductions/14177

The pinDigests is intended to be usable by other managers though, so the title of this bug report isn't the right one. Please expand the title/description so that it's clearer on the problem, e.g. does "Error updating gitlabci includes if pinDigests=true" describe your problem?

@rarkins rarkins added reproduction:provided and removed auto:reproduction A minimal reproduction is necessary to proceed labels Feb 15, 2022
@dirkoberhaus dirkoberhaus changed the title pinDigest is also used in other managers than docker Error updating gitlabci includes if pinDigests=true" Feb 15, 2022
@dirkoberhaus
Copy link
Author

dirkoberhaus commented Feb 15, 2022

Yes, this is the problem I've seen with current Renovate version 31.81.7

The last version without that problem in our Renovate job seems to be 28.26.0.

@rarkins rarkins added priority-4-low Low priority, unlikely to be done unless it becomes important to more people manager:gitlabci GitLab CI config files status:ready and removed priority-5-triage auto:logs Issue or Discussion is needs logs/more logs status:requirements Full requirements are not yet known, so implementation should not be started labels Feb 15, 2022
@rarkins
Copy link
Collaborator

rarkins commented Feb 15, 2022

As a workaround, configure pinDigests for only Docker this way:

{
  "docker": {
    "pinDigests": true
  }
}

@nichtsundniemand
Copy link

nichtsundniemand commented Mar 18, 2022

Hey, I unfortunately only found this issue after spending some time debugging the problem myself. What is being described matches what I've been able to find out pretty well though.

My Workaround was the opposite:

{
    "gitlabci-include": {
        "pinDigests": false
    }
}

After bisecting the renovate-history I found the version which introduced digest-extraction for GitLab-repositories and also this behaviour. It's v31.17.0 created by this PR: #13361

@nichtsundniemand
Copy link

@hasanwhitesource Could something like #15113 work for gitlabci-include as well?
If so I might create a PR next time I'm at work.

@viceice
Copy link
Member

viceice commented Apr 23, 2022

That manager will be merged to gitlabci soon. so it will fixed automatically

@ppussar
Copy link

ppussar commented Jul 22, 2022

@therufuser @rarkins just to be sure, the workaround was to switch off docker-digests pinning in gitlab-ci?
Or is there any chance to get it working?

@craig
Copy link

craig commented Oct 4, 2023

That manager will be merged to gitlabci soon. so it will fixed automatically

I think it's still not fixed?

@prehor
Copy link

prehor commented Mar 17, 2024

I have similar problem with HelmRepository type:oci which uses docker datasource and "extends": ["docker:pinDigest"]. @rarkins workaround helps in this situation too:

As a workaround, configure pinDigests for only Docker this way:

{
  "docker": {
    "pinDigests": true
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:gitlabci GitLab CI config files priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

8 participants
@craig @viceice @nichtsundniemand @ppussar @rarkins @prehor @dirkoberhaus and others