Skip to content

Commit

Permalink
Merge branch 'main' into feat/gomod-notify-extra-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored May 18, 2024
2 parents 39c04df + 7f6964c commit 77086d3
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 41 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:10.6.10
FROM ghcr.io/containerbase/devcontainer:10.6.11
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
run: gh api ${{ env.PR_URL }} | jq -rc '${{ env.JQ_FILTER }}' >> "$GITHUB_OUTPUT"

- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
filter: blob:none # we don't need all blobs
sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
steps:
- name: Checkout code
if: needs.setup.outputs.os-matrix-is-full && runner.os != 'Linux'
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
filter: blob:none # we don't need all blobs
sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
Expand All @@ -175,7 +175,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
include: ${{ fromJSON(needs.setup.outputs.test-shard-matrix) }}

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -393,7 +393,7 @@ jobs:
if: (success() || failure()) && github.event_name != 'merge_group' && github.event.pull_request.draft != true
steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
filter: blob:none # we don't need all blobs
show-progress: false
Expand Down Expand Up @@ -421,7 +421,7 @@ jobs:
if: (success() || failure()) && github.event.pull_request.draft != true
steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
filter: blob:none # we don't need all blobs
sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
Expand Down Expand Up @@ -511,7 +511,7 @@ jobs:
if: github.event.pull_request.draft != true
steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -545,7 +545,7 @@ jobs:
if: github.event.pull_request.draft != true
steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -576,7 +576,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down Expand Up @@ -625,7 +625,7 @@ jobs:
packages: write

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0 # zero stands for full checkout, which is required for semantic-release
filter: blob:none # we don't need all blobs, only the full tree
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: github.event.pull_request.draft != true
steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: 'Checkout code'
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false
show-progress: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- full

steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ws_scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
WS_SCAN:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
show-progress: false

Expand Down
6 changes: 6 additions & 0 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -3737,6 +3737,12 @@ every 3 months on the first day of the month
* 0 2 * *
```

<!-- 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`.

<!-- prettier-ignore -->
!!! warning
For Cron schedules, you _must_ use the `*` wildcard for the minutes value, as Renovate doesn't support minute granularity.
Expand Down
2 changes: 1 addition & 1 deletion lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ const options: RenovateOptions[] = [
description:
'Change this value to override the default Renovate sidecar image.',
type: 'string',
default: 'ghcr.io/containerbase/sidecar:10.6.10',
default: 'ghcr.io/containerbase/sidecar:10.6.11',
globalOnly: true,
},
{
Expand Down
38 changes: 38 additions & 0 deletions lib/workers/repository/process/lookup/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { DockerDatasource } from '../../../../modules/datasource/docker';
import { GitRefsDatasource } from '../../../../modules/datasource/git-refs';
import { GithubReleasesDatasource } from '../../../../modules/datasource/github-releases';
import { GithubTagsDatasource } from '../../../../modules/datasource/github-tags';
import { GoDatasource } from '../../../../modules/datasource/go';
import { MavenDatasource } from '../../../../modules/datasource/maven';
import { NpmDatasource } from '../../../../modules/datasource/npm';
import { PackagistDatasource } from '../../../../modules/datasource/packagist';
Expand Down Expand Up @@ -4560,5 +4561,42 @@ describe('workers/repository/process/lookup/index', () => {
expect(updates).toBeEmptyArray();
});
});

it('detects gomod updates and uses updateType=digest when appropriate', async () => {
config.manager = 'gomod';
config.datasource = GoDatasource.id;
config.currentValue = 'v0.0.0-20240506185236-b8a5c65736ae';
config.currentDigest = 'b8a5c65736ae';
config.packageName = 'google.golang.org/genproto/googleapis/rpc';
config.digestOneAndOnly = true;

httpMock
.scope(
'https://proxy.golang.org/google.golang.org/genproto/googleapis/rpc',
)
.get('/@v/list')
.reply(200, '')
.get('/v2/@v/list')
.reply(404)
.get('/@latest')
.reply(200, { Version: 'v0.0.0-20240509183442-62759503f434' });

const { updates } = await Result.wrap(
lookup.lookupUpdates(config),
).unwrapOrThrow();

expect(updates).toEqual([
{
bucket: 'non-major',
newDigest: '62759503f434',
newMajor: 0,
newMinor: 0,
newValue: 'v0.0.0-20240509183442-62759503f434',
newVersion: 'v0.0.0-20240509183442-62759503f434',
releaseTimestamp: '2024-05-09T18:34:42.000Z',
updateType: 'digest',
},
]);
});
});
});
11 changes: 11 additions & 0 deletions lib/workers/repository/process/lookup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,17 @@ export async function lookupUpdates(
bucket,
release,
);

// #29034
if (
config.manager === 'gomod' &&
compareValue?.startsWith('v0.0.0-') &&
update.newValue?.startsWith('v0.0.0-') &&
config.currentDigest !== update.newDigest
) {
update.updateType = 'digest';
}

if (pendingChecks) {
update.pendingChecks = pendingChecks;
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"fs-extra": "11.2.0",
"git-url-parse": "14.0.0",
"github-url-from-git": "1.5.0",
"glob": "10.3.12",
"glob": "10.3.15",
"global-agent": "3.0.0",
"good-enough-parser": "1.1.23",
"google-auth-library": "9.9.0",
Expand Down Expand Up @@ -337,7 +337,7 @@
"npm-run-all2": "6.1.2",
"nyc": "15.1.0",
"pretty-format": "29.7.0",
"rimraf": "5.0.5",
"rimraf": "5.0.7",
"semantic-release": "22.0.12",
"tar": "6.2.1",
"tmp-promise": "3.0.3",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ ARG BASE_IMAGE_TYPE=slim
# --------------------------------------
# slim image
# --------------------------------------
FROM ghcr.io/renovatebot/base-image:2.11.2@sha256:865603a61fea86becd8b373a8fcc2a3b5aa492958e1df52da3ff3402c8a5ca94 AS slim-base
FROM ghcr.io/renovatebot/base-image:2.12.3@sha256:7b543387d195207dd1a026dd5590229306e5e7f25ebd92ffe51f550d8cadda40 AS slim-base

# --------------------------------------
# full image
# --------------------------------------
FROM ghcr.io/renovatebot/base-image:2.11.2-full@sha256:6356c034403a795159d390dccd9838e0c377748c17c5b638f808612dadd87e7e AS full-base
FROM ghcr.io/renovatebot/base-image:2.12.3-full@sha256:12073b2a8bf5889c80423e42a4b1f28805515ed1efb6f6078bed8f188d0d6120 AS full-base

# --------------------------------------
# build image
Expand Down

0 comments on commit 77086d3

Please sign in to comment.