Skip to content

Commit

Permalink
Merge branch 'main' into fix-pypi-simple-first
Browse files Browse the repository at this point in the history
  • Loading branch information
samgiz authored Oct 17, 2024
2 parents 1b4190d + 3623e57 commit 1e2f061
Show file tree
Hide file tree
Showing 51 changed files with 1,812 additions and 590 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/containerbase/devcontainer:12.0.1
FROM ghcr.io/containerbase/devcontainer:12.0.5
15 changes: 3 additions & 12 deletions .github/DISCUSSION_TEMPLATE/request-help.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
body:
- type: dropdown
id: question-type
attributes:
label: What would you like help with?
options:
- 'I would like help with my configuration'
- 'I think I found a bug'
- 'Other'

- type: dropdown
id: how-are-you-running-renovate
attributes:
label: How are you running Renovate?
options:
- 'Mend Renovate hosted app on github.com'
- 'Self-hosted'
- 'A Mend.io-hosted app'
- 'Self-hosted Renovate'

- type: input
id: self-hosted-version
Expand All @@ -29,7 +20,7 @@ body:
label: Please tell us more about your question or problem
description: |
Remember to [follow these guidelines](https://github.com/renovatebot/renovate/blob/main/docs/development/help-us-help-you.md) for maximum effectiveness.
It may help to include a [minimal reproduction](https://github.com/renovatebot/renovate/blob/main/docs/development/minimal-reproductions.md) as well.
Include a [minimal reproduction](https://github.com/renovatebot/renovate/blob/main/docs/development/minimal-reproductions.md) if you think you found a bug.
validations:
required: true

Expand Down
50 changes: 0 additions & 50 deletions .github/label-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,56 +374,6 @@
As a general rule, we will read and respond to all discussions in this repository, so there is no need to mention us.
Thanks, the Renovate team
'auto:bug-to-idea':
comment: >
Hi there,
A maintainer reviewed the information, and decided that this is not a bug. To avoid confusing others, we will close this Discussion. Please keep reading as there is good news too!
The good news is that the maintainer likes your idea, in general. Please create a new [Suggest an Idea](https://github.com/renovatebot/renovate/discussions/new?category=suggest-an-idea) Discussion. Feel free to copy/paste what you need from this Discussion. Please focus on the feature request: explain what Renovate should do, and how Renovate can know when/what to do. We may convert that Discussion to an Issue when it is ready. Note that you will still have to wait for a maintainer, or someone else, to do the work needed for your feature.
Why are we closing your Discussion? For us, bug reports are about things that are not working as intended, or things that are not working as described in the docs. What you found may be bad behavior, but we do not think it is a bug.
For more details, please read [our development docs about bug handling](https://github.com/renovatebot/renovate/blob/main/docs/development/bug-handling.md).
Thanks, the Renovate team
'auto:bug-invalid':
comment: >
Hi there,
A maintainer decided this is not a bug, and behaving as designed. The maintainer will explain why this behavior is correct. To avoid confusing future readers, we will close this Discussion.
We want Bug-type Discussions to be about things that we rate as bugs. For more details, please read [our development docs about bug handling](https://github.com/renovatebot/renovate/blob/main/docs/development/bug-handling.md).
If this bug report makes you think of an idea for a new feature, or how to improve a current feature, feel free to create a new [Suggest an Idea](https://github.com/renovatebot/renovate/discussions/new?category=suggest-an-idea) Discussion.
Thanks, the Renovate team
close: true
close-reason: 'outdated'

'auto:bug-converted':
comment: >
Hi there,
A maintainer confirmed this is a bug, and converted this Discussion to an Issue. If you have more thoughts/info about the bug, please post them in the Issue.
We will close this Discussion, as we want new info to go in the Issue.
Thanks, the Renovate team
'auto:idea-rewrite':
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ jobs:
show-progress: false

- name: docker-config
uses: containerbase/internal-tools@8d6d9564612c4027a8da337b31baea2fa8cd14f7 # v3.4.27
uses: containerbase/internal-tools@6f01a79fa84b644ff600d1926ee57b282e7219e0 # v3.4.30
with:
command: docker-config

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
languages: javascript

Expand All @@ -51,7 +51,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/autobuild@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -65,4 +65,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
with:
show-progress: false

- uses: aquasecurity/trivy-action@e5f43133f6e8736992c9f3c1b3296e24b37e17f2 # 0.10.0
- uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # 0.28.0
with:
image-ref: ghcr.io/renovatebot/renovate:${{ matrix.tag }}
format: 'sarif'
output: 'trivy-results.sarif'

- uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
- uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: trivy-results.sarif
category: 'docker-image-${{ matrix.tag }}'
9 changes: 3 additions & 6 deletions .github/workflows/undesirable-test-additions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ jobs:
fetch-depth: 0 # Fetch all history for comparison
sparse-checkout: true
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Check for undesirable code
run: |
#!/bin/bash
set -e
echo "### Fetching base branch for comparison..."
git fetch origin ${{ github.event.pull_request.base.ref }}
BASE_BRANCH=origin/${{ github.event.pull_request.base.ref }}
BASE_BRANCH=${{ github.event.pull_request.base.ref }}
echo "Base branch is: $BASE_BRANCH"
echo "Current HEAD is: $(git rev-parse HEAD)"
BASE_BRANCH_REF=${{ github.event.pull_request.base.sha }}
echo "Base branch ref for this PR is: $BASE_BRANCH_REF"
Expand All @@ -44,7 +41,7 @@ jobs:
fi
echo "### Calculating file changes in '__fixtures__' directories..."
git diff --name-status $BASE_BRANCH..HEAD > diff_name_status.txt
git diff --name-status $BASE_BRANCH_REF > diff_name_status.txt
echo "### Processing added files in '__fixtures__' directories..."
ADDED_FIXTURES=$(grep '^A' diff_name_status.txt | awk '{print $2}' | grep '/__fixtures__/' || true)
Expand Down
129 changes: 77 additions & 52 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -3045,6 +3045,59 @@ Tokens can be configured via `hostRules` using the `"merge-confidence"` `hostTyp
}
```

### overrideDatasource

If a particular `datasource`/`packageName` combination has a lookup problem, you may be able to fix it by _changing_ `datasource` and potentially also `packageName`.
Here is an example:

```json
{
"packageRules": [
{
"matchDatasources": ["docker"],
"matchPackageNames": ["renovate/renovate"],
"overrideDatasource": "npm",
"overridePackageName": "renovate"
}
]
}
```

`overrideDatasource` does not support template compilation.
Be cautious as using this setting incorrectly could break all lookups.

### overrideDepName

Be careful using this feature because it may cause undesirable changes such as to branch names.

In Renovate terminology, `packageName` is the exact package name needing to be looked up on a registry, while `depName` is essentially the "pretty" name.
For example, the `packageName` is `docker.io/library/node` while the `depName` might be `node` for short.

`depName` is used in PR titles as well as branch names, so changes to `depName` will have effects on those.

`overrideDepName` supports template compilation.
Example:

```json
{
"packageRules": [
{
"matchDatasources": ["docker"],
"overrideDepName": "{{replace 'docker.io/library/' '' depName}}"
}
]
}
```

Be cautious as using this setting incorrectly could break all lookups.

### overridePackageName

See the [`overrideDatasource`](#overridedatasource) documentation for an example of use.
`overridePackageName` supports template compilation.

Be cautious as using this setting incorrectly could break all lookups.

### prPriority

Sometimes Renovate needs to rate limit its creation of PRs, e.g. hourly or concurrent PR limits.
Expand Down Expand Up @@ -3727,77 +3780,49 @@ We recommend you do this selectively with `packageRules` and not globally.

## schedule

The `schedule` option allows you to define times of week or month for Renovate updates.
Running Renovate around the clock can be too "noisy" for some projects.
To reduce the noise you can use the `schedule` config option to limit the time frame in which Renovate will perform actions on your repository.
You can use the standard [Cron syntax](https://crontab.guru/crontab.5.html) and [Later syntax](https://github.com/breejs/later) to define your schedule.
The `schedule` option allows you to define times of the day, week or month when you are willing to allow Renovate to create branches.

The default value for `schedule` is "at any time", which is functionally the same as declaring a `null` schedule.
i.e. Renovate will run on the repository around the clock.
Setting a `schedule` does not itself cause or trigger Renovate to run. It's like putting a sign on your office which says "DHL deliveries only accepted between 9-11am". Such a sign won't _cause_ DHL to come to your office only at 9-11am, instead it simply means that if they come at any other time of the day then they'll honor the sign and skip you. It also means that if they rarely attempt between 9-11am then you'll often get no deliveries in a day. Similarly, if you set too restrictive of a Renovate `schedule` and the chance of Renovate running on your repo during those hours is low, then you might find your dependency updates regularly skipped. For this reason we recommend you usually allow a time window of at least 3-4 hours in any `schedule` unless your instance of Renovate is expected to run more frequently than that.

Renovate supports the standard [Cron syntax](https://crontab.guru/crontab.5.html) as well as deprecated support for a subset of [Later syntax](https://github.com/breejs/later).
We recommend you always use Cron syntax, due to its superior testing and robustness.
Config support questions are no longer accepted for Later syntax problems - you will be recommended to use Cron instead.

The default value for `schedule` is "at any time", which is functionally the same as declaring a `null` schedule or `* * * * *` with Cron.
i.e. Renovate will create Pull Requests at any time of any day, as needed.

The easiest way to define a schedule is to use a preset if one of them fits your requirements.
See [Schedule presets](./presets-schedule.md) for details and feel free to request a new one in the source repository if you think it would help others.

```title="Some text schedules that are known to work"
every weekend
before 5:00am
after 10pm and before 5:00am
after 10pm and before 5am every weekday
on friday and saturday
every 3 months on the first day of the month
* 0 2 * *
```
Here are some example schedules and their Cron equivalent:

<!-- prettier-ignore -->
!!! warning
You _must_ keep the number and the `am`/`pm` part _together_!
Correct: `before 5am`, or `before 5:00am`.
Wrong: `before 5 am`, or `before 5:00 am`.
| English description | Supported by Later? | Cron syntax |
| -------------------------------------------- | ------------------- | --------------------- |
| every weekend || `* * * * 0,6` |
| before 5:00am || `* 0-4 * * *` |
| after 10pm and before 5am every weekday || `* 22-23,0-4 * * 1-5` |
| on friday and saturday || `* * * * 5,6` |
| every 3 months on the first day of the month || `* * 1 */3 *` |

<!-- prettier-ignore -->
!!! warning
!!! note
For Cron schedules, you _must_ use the `*` wildcard for the minutes value, as Renovate doesn't support minute granularity.

One example might be that you don't want Renovate to run during your typical business hours, so that your build machines don't get clogged up testing `package.json` updates.
You could then configure a schedule like this at the repository level:

```json
{
"schedule": ["after 10pm and before 5am every weekday", "every weekend"]
"schedule": ["* 22-23,0-4 * * *", "* * * * 0,6"]
}
```

This would mean that Renovate can run for 7 hours each night plus all the time on weekends.
Note how the above example makes use of the "OR" logic of combining multiple schedules in the array.

This scheduling feature can also be particularly useful for "noisy" packages that are updated frequently, such as `aws-sdk`.

To restrict `aws-sdk` to only monthly updates, you could add this package rule:

```json
{
"packageRules": [
{
"matchPackageNames": ["aws-sdk"],
"extends": ["schedule:monthly"]
}
]
}
```

Technical details: We mostly rely on the text parsing of the library [@breejs/later](https://github.com/breejs/later) but only its concepts of "days", "time_before", and "time_after".
Read the parser documentation at [breejs.github.io/later/parsers.html#text](https://breejs.github.io/later/parsers.html#text).
To parse Cron syntax, Renovate uses [cron-parser](https://github.com/harrisiirak/cron-parser).
Renovate does not support scheduled minutes or "at an exact time" granularity.

<!-- prettier-ignore -->
!!! tip
If you want to _disable_ Renovate, then avoid setting `schedule` to `"never"`.
Instead, use the `enabled` config option to disable Renovate.
Read the [`enabled` config option docs](#enabled) to learn more.

<!-- prettier-ignore -->
!!! note
Actions triggered via the [Dependency Dashboard](#dependencydashboard) are not restricted by a configured schedule.
It's common to use `schedule` in combination with [`timezone`](#timezone).
You should configure [`updateNotScheduled=false`](#updatenotscheduled) if you want the schedule more strictly enforced so that _updates_ to existing branches aren't pushed out of schedule.
You can also configure [`automergeSchedule`](#automergeschedule) to limit the hours in which branches/PRs are _automerged_ (if [`automerge`](#automerge) is configured).

## semanticCommitScope

Expand Down Expand Up @@ -3918,7 +3943,7 @@ The above config will suppress the comment which is added to a PR whenever you c

## timezone

It is only recommended to configure this field if you wish to use the `schedules` feature and want to write them in your local timezone.
It is only recommended to configure this field if you wish to use the `schedule` feature and want them evaluated in your local timezone.
Please see the above link for valid timezone names.

## updateInternalDeps
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ Renovate will get the credentials with the [`google-auth-library`](https://www.n
service_account: ${{ env.SERVICE_ACCOUNT }}

- name: renovate
uses: renovatebot/github-action@v40.3.2
uses: renovatebot/github-action@v40.3.4
env:
RENOVATE_HOST_RULES: |
[
Expand Down Expand Up @@ -478,7 +478,7 @@ Make sure to install the Google Cloud SDK into the custom image, as you need the
For example:

```Dockerfile
FROM renovate/renovate:38.110.2
FROM renovate/renovate:38.120.1
# Include the "Docker tip" which you can find here https://cloud.google.com/sdk/docs/install
# under "Installation" for "Debian/Ubuntu"
RUN ...
Expand Down
Loading

0 comments on commit 1e2f061

Please sign in to comment.