Skip to content

Commit

Permalink
Merge branch 'main' into devbox-containerbase-install
Browse files Browse the repository at this point in the history
  • Loading branch information
burritobill authored Feb 3, 2025
2 parents 6f51e60 + 6f862cc commit f4e1e5e
Show file tree
Hide file tree
Showing 22 changed files with 274 additions and 141 deletions.
6 changes: 5 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
FROM ghcr.io/containerbase/devcontainer:13.7.2
FROM ghcr.io/containerbase/devcontainer:13.7.5

# https://github.com/pnpm/pnpm/issues/8971
# renovate: datasource=npm
RUN install-tool pnpm 9.15.4
2 changes: 1 addition & 1 deletion .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if [[ "${CODESPACES}" == true ]]; then
sudo chmod 1777 /tmp
fi

COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install
pnpm install --reporter append-only --aggregate-output
53 changes: 42 additions & 11 deletions .github/label-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,6 @@
</details>
### Insufficient logs
<details><summary>Select me to read instructions</summary>
If you already gave us a log, and the Renovate team said it's not enough, then follow the instructions from the **No logs at all** section.
</details>
### Formatting your logs
<details><summary>Select me to read instructions</summary>
Expand Down Expand Up @@ -137,12 +127,31 @@
The Renovate team
'auto:logs-insufficient':
comment: >
Hi there,
The logs you provided are insufficient to help you.
Please provide more logs, or more detailed logs, so we can help you. Be sure to include _DEBUG_ logs, and don't excessively redact or truncate them.
If you feel the logs are too large to paste here, please use a service like [GitHub Gist](https://gist.github.com/) and paste the link here.
Read the [Renovate docs, Troubleshooting](https://docs.renovatebot.com/troubleshooting/) to learn more about getting the correct logs.
Thanks, the Renovate team
'auto:logs-packages':
comment: >
Hi there,
A maintainer wants you to find and share a specific log message (`packageFiles with updates`) from your repository or environment.
Please locate the debug message `packageFiles with updates` in your logs and paste the contents here. Depending on your question, we may need the full list of packages or only one.
If you self-host Renovate: make sure you run Renovate with `LOG_LEVEL=debug` to get the debug log messages! Next, open the debug-level logs and search for `packageFiles with updates`. This text marks the start of a structured log message that shows every package file, dependency, and update that Renovate found.
Expand Down Expand Up @@ -531,3 +540,25 @@
Thanks, the Renovate team
'auto:inactive-pr':
comment: >
Hi there,
This PR appears to have been inactive for a while. Please let us know if you are still working on it, or if we can close it for now.
Thanks, the Renovate team
'auto:close-inactive-pr':
comment: >
Hi there,
We're closing this PR due to inactivity, but we are happy for you, or others, to finish the PR if time allows.
Thanks, the Renovate team
close: true
8 changes: 4 additions & 4 deletions docs/development/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You need the following dependencies for local development:

- Git `>=2.45.1`
- Node.js `^20.15.1`
- pnpm `^9.0.0` (use corepack)
- pnpm `^9.0.0`
- C++ compiler

We recommend you use the version of Node.js defined in the repository's `.nvmrc` or use [Volta](https://volta.sh/) to manage your tool versions.
Expand All @@ -26,12 +26,12 @@ You can use the following commands on Ubuntu.
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get update
sudo apt-get install -y git build-essential nodejs
corepack enable
npm install -g pnpm@latest-10
```

#### Nix

To enter a development shell with the necessary packages, run `nix-shell --packages gcc gitFull nodejs` and then `corepack enable`.
To enter a development shell with the necessary packages, run `nix-shell --packages gcc gitFull nodejs` and then `npm install -global pnpm@latest-10`.

#### Windows

Expand All @@ -41,7 +41,7 @@ If you already installed a part, skip the corresponding step.
- Install [Git](https://git-scm.com/downloads). Make sure you've [configured your username and email](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)
- Install [Node.js LTS](https://nodejs.org/en/download/)
- In an Administrator PowerShell prompt, run `npm install -global npm` and then `npm --debug install --global windows-build-tools`
- Enable corepack with: `corepack enable`
- Install pnpm with: `npm install -global pnpm@latest-10`

You can see what versions you're using like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ It will be compiled using Handlebars and the regex `groups` result.
It specifies the syntax of the package file that's managed by the custom `jsonata` manager.
This setting helps the system correctly parse and interpret the configuration file's contents.

Only the `json` and `yaml` format is supported.
Only the `json` and `yaml` formats are supported.
`yaml` files are parsed as multi document YAML files.

```json title="Parsing a JSON file with a custom manager"
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/docker.md
Original file line number Diff line number Diff line change
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:39.134.0
FROM renovate/renovate:39.156.2
# Include the "Docker tip" which you can find here https://cloud.google.com/sdk/docs/install
# under "Installation" for "Debian/Ubuntu"
RUN ...
Expand Down
10 changes: 5 additions & 5 deletions docs/usage/examples/self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ It builds `latest` based on the `main` branch and all SemVer tags are published
```sh title="Example of valid tags"
docker run --rm renovate/renovate
docker run --rm renovate/renovate:39
docker run --rm renovate/renovate:39.134
docker run --rm renovate/renovate:39.134.0
docker run --rm renovate/renovate:39.156
docker run --rm renovate/renovate:39.156.2
```

<!-- prettier-ignore -->
Expand Down Expand Up @@ -62,7 +62,7 @@ spec:
- name: renovate
# Update this to the latest available and then enable Renovate on
# the manifest
image: renovate/renovate:39.134.0
image: renovate/renovate:39.156.2
args:
- user/repo
# Environment Variables
Expand Down Expand Up @@ -121,7 +121,7 @@ spec:
template:
spec:
containers:
- image: renovate/renovate:39.134.0
- image: renovate/renovate:39.156.2
name: renovate-bot
env: # For illustration purposes, please use secrets.
- name: RENOVATE_PLATFORM
Expand Down Expand Up @@ -367,7 +367,7 @@ spec:
containers:
- name: renovate
# Update this to the latest available and then enable Renovate on the manifest
image: renovate/renovate:39.134.0
image: renovate/renovate:39.156.2
volumeMounts:
- name: ssh-key-volume
readOnly: true
Expand Down
1 change: 1 addition & 0 deletions lib/data/monorepo.json
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@
"orleans": "https://github.com/dotnet/orleans",
"panda-css": "https://github.com/chakra-ui/panda",
"parcel": "https://github.com/parcel-bundler/parcel",
"payloadcms": "https://github.com/payloadcms/payload",
"percy-cli": "https://github.com/percy/cli",
"picassojs": "https://github.com/qlik-oss/picasso.js",
"pixijs": [
Expand Down
22 changes: 22 additions & 0 deletions lib/modules/manager/pip-compile/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ jest.mock('../../../util/host-rules', () => mockDeep());
jest.mock('../../../util/http');
jest.mock('../../datasource', () => mockDeep());

const requirementsWithUv = `# This file was autogenerated by uv via the following command:
# uv pip compile --generate-hashes --output-file=requirements.txt --universal requirements.in
attrs==21.2.0 \
--hash=sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1 \
--hash=sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb
# via -r requirements.in
setuptools==59.2.0 \
--hash=sha256:157d21de9d055ab9e8ea3186d91e7f4f865e11f42deafa952d90842671fc2576 \
--hash=sha256:4adde3d1e1c89bde1c643c64d89cdd94cbfd8c75252ee459d4500bccb9c7d05d
# via -r requirements.in
`;

function getCommandInHeader(command: string) {
return `#
# This file is autogenerated by pip-compile with Python 3.11
Expand Down Expand Up @@ -488,6 +500,16 @@ describe('modules/manager/pip-compile/artifacts', () => {
);
});

it('returns extracted arguments for uv ', () => {
expect(
constructPipCompileCmd(
extractHeaderCommand(requirementsWithUv, 'subdir/requirements.txt'),
),
).toBe(
'uv pip compile --generate-hashes --output-file=requirements.txt --universal requirements.in',
);
});

it('returns --no-emit-index-url when credentials are found in PIP_INDEX_URL', () => {
process.env.PIP_INDEX_URL = 'https://user:[email protected]/pypi/simple';
expect(
Expand Down
4 changes: 3 additions & 1 deletion lib/modules/manager/pip-compile/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function constructPipCompileCmd(
compileArgs: PipCompileArgs,
upgradePackages: Upgrade[] = [],
): string {
if (compileArgs.isCustomCommand) {
if (compileArgs.commandType === 'custom') {
throw new Error(
'Detected custom command, header modified or set by CUSTOM_COMPILE_COMMAND',
);
Expand All @@ -68,6 +68,7 @@ export function constructPipCompileCmd(
}
// safeguard against index url leak if not explicitly set by an option
if (
compileArgs.commandType === 'pip-compile' &&
!compileArgs.noEmitIndexUrl &&
!compileArgs.emitIndexUrl &&
haveCredentialsInPipEnvironmentVariables()
Expand Down Expand Up @@ -115,6 +116,7 @@ export async function updateArtifacts({
}
const compileArgs = extractHeaderCommand(existingOutput, outputFileName);
const pythonVersion = extractPythonVersion(
compileArgs.commandType,
existingOutput,
outputFileName,
);
Expand Down
29 changes: 24 additions & 5 deletions lib/modules/manager/pip-compile/common.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mockDeep } from 'jest-mock-extended';
import { hostRules } from '../../../../test/util';
import { logger } from '../../../logger';
import {
allowedPipOptions,
allowedOptions,
extractHeaderCommand,
extractPythonVersion,
getRegistryCredVarsFromPackageFiles,
Expand Down Expand Up @@ -137,8 +137,8 @@ describe('modules/manager/pip-compile/common', () => {
).toEqual(exampleSourceFiles);
});

it.each(allowedPipOptions)(
'returned sourceFiles must not contain options',
it.each(allowedOptions['pip-compile'])(
'returned sourceFiles must not contain options (pip-compile)',
(argument: string) => {
const sourceFiles = extractHeaderCommand(
getCommandInHeader(`pip-compile ${argument}=reqs.txt reqs.in`),
Expand All @@ -149,13 +149,25 @@ describe('modules/manager/pip-compile/common', () => {
},
);

it.each(allowedOptions['uv'])(
'returned sourceFiles must not contain options (uv)',
(argument: string) => {
const sourceFiles = extractHeaderCommand(
getCommandInHeader(`uv pip compile ${argument}=reqs.txt reqs.in`),
'reqs.txt',
).sourceFiles;
expect(sourceFiles).not.toContainEqual(argument);
expect(sourceFiles).toEqual(['reqs.in']);
},
);

it('detects custom command', () => {
expect(
extractHeaderCommand(
getCommandInHeader(`./pip-compile-wrapper reqs.in`),
'reqs.txt',
),
).toHaveProperty('isCustomCommand', true);
).toHaveProperty('commandType', 'custom');
});

it.each([
Expand All @@ -176,14 +188,21 @@ describe('modules/manager/pip-compile/common', () => {
it('extracts Python version from valid header', () => {
expect(
extractPythonVersion(
'pip-compile',
getCommandInHeader('pip-compile reqs.in'),
'reqs.txt',
),
).toBe('3.11');
});

it('returns undefined if version cannot be extracted', () => {
expect(extractPythonVersion('', 'reqs.txt')).toBeUndefined();
expect(
extractPythonVersion('pip-compile', '', 'reqs.txt'),
).toBeUndefined();
});

it('returns undefined if the command type is uv', () => {
expect(extractPythonVersion('uv', '', 'reqs.txt')).toBeUndefined();
});
});

Expand Down
Loading

0 comments on commit f4e1e5e

Please sign in to comment.