diff --git a/lib/config/presets/common.ts b/lib/config/presets/common.ts index 4fb427a4a3cfe9..d79e996f3a8241 100644 --- a/lib/config/presets/common.ts +++ b/lib/config/presets/common.ts @@ -42,6 +42,7 @@ export const removedPresets: Record = { 'customManagers:helmChartYamlAppVersions', 'regexManagers:mavenPropertyVersions': 'customManagers:mavenPropertyVersions', 'regexManagers:tfvarsVersions': 'customManagers:tfvarsVersions', + 'workarounds:reduceRepologyServerLoad': null, }; const renamedMonorepos: Record = { diff --git a/lib/config/presets/internal/workarounds.ts b/lib/config/presets/internal/workarounds.ts index 815d864ec649a1..53ef59c34a1add 100644 --- a/lib/config/presets/internal/workarounds.ts +++ b/lib/config/presets/internal/workarounds.ts @@ -14,7 +14,6 @@ export const presets: Record = { 'workarounds:ignoreHttp4sDigestMilestones', 'workarounds:typesNodeVersioning', 'workarounds:nodeDockerVersioning', - 'workarounds:reduceRepologyServerLoad', 'workarounds:doNotUpgradeFromAlpineStableToEdge', 'workarounds:supportRedHatImageVersion', 'workarounds:javaLTSVersions', @@ -201,17 +200,6 @@ export const presets: Record = { }, ], }, - reduceRepologyServerLoad: { - description: - 'Limit requests to reduce load on Repology servers until we can fix this properly, see issue `#10133`.', - hostRules: [ - { - concurrentRequestLimit: 1, - matchHost: 'repology.org', - maxRequestsPerSecond: 0.5, - }, - ], - }, supportRedHatImageVersion: { description: 'Use specific versioning for Red Hat-maintained container images.', diff --git a/lib/util/git/private-key.spec.ts b/lib/util/git/private-key.spec.ts index f5fe50ac5589b3..1f365b0f5e544a 100644 --- a/lib/util/git/private-key.spec.ts +++ b/lib/util/git/private-key.spec.ts @@ -89,7 +89,8 @@ describe('util/git/private-key', () => { -----BEGIN OPENSSH PRIVATE KEY----- some-private-key with-passphrase some-private-key with-passphrase ------END OPENSSH PRIVATE KEY-----`); +-----END OPENSSH PRIVATE KEY----- +`); await expect(writePrivateKey()).rejects.toThrow(); }); @@ -98,7 +99,8 @@ some-private-key with-passphrase -----BEGIN OPENSSH PRIVATE KEY----- some-private-key some-private-key ------END OPENSSH PRIVATE KEY-----`; +-----END OPENSSH PRIVATE KEY----- +`; const privateKeyFile = upath.join(os.tmpdir() + '/git-private-ssh.key'); const publicKeyFile = `${privateKeyFile}.pub`; const publicKey = 'some-public-key'; diff --git a/lib/util/git/private-key.ts b/lib/util/git/private-key.ts index 5e929479366a28..2b8828e6064146 100644 --- a/lib/util/git/private-key.ts +++ b/lib/util/git/private-key.ts @@ -24,7 +24,7 @@ abstract class PrivateKey { protected abstract readonly gpgFormat: string; constructor(key: string) { - this.key = key.trim(); + this.key = key; addSecretForSanitizing(this.key, 'global'); logger.debug( 'gitPrivateKey: successfully set (but not yet written/configured)', @@ -57,6 +57,10 @@ abstract class PrivateKey { class GPGKey extends PrivateKey { protected readonly gpgFormat = 'openpgp'; + constructor(key: string) { + super(key.trim()); + } + protected async importKey(): Promise { const keyFileName = upath.join(os.tmpdir() + '/git-private-gpg.key'); await fs.outputFile(keyFileName, this.key); diff --git a/lib/util/http/rate-limits.ts b/lib/util/http/rate-limits.ts index 03554db352e6ca..c6105379a1c60b 100644 --- a/lib/util/http/rate-limits.ts +++ b/lib/util/http/rate-limits.ts @@ -9,6 +9,10 @@ const concurrencyDefaults: ConcurrencyLimitRule[] = [ matchHost: 'registry.npmjs.org', concurrency: 999, }, + { + matchHost: 'repology.org', + concurrency: 1, + }, { matchHost: '*', concurrency: 16, @@ -35,6 +39,10 @@ const throttleDefaults: ThrottleLimitRule[] = [ matchHost: 'https://plugins.gradle.org', throttleMs: 50, }, + { + matchHost: 'repology.org', + throttleMs: 2000, + }, ]; let throttleLimits: ThrottleLimitRule[] = []; diff --git a/lib/workers/repository/reconfigure/index.spec.ts b/lib/workers/repository/reconfigure/index.spec.ts index ac35bf87888946..d7b9e5a97dac5e 100644 --- a/lib/workers/repository/reconfigure/index.spec.ts +++ b/lib/workers/repository/reconfigure/index.spec.ts @@ -37,6 +37,14 @@ describe('workers/repository/reconfigure/index', () => { GlobalConfig.reset(); }); + it('no effect when running with platform=local', async () => { + GlobalConfig.set({ platform: 'local' }); + await validateReconfigureBranch(config); + expect(logger.debug).toHaveBeenCalledWith( + 'Not attempting to reconfigure when running with local platform', + ); + }); + it('no effect on repo with no reconfigure branch', async () => { scm.branchExists.mockResolvedValueOnce(false); await validateReconfigureBranch(config); diff --git a/lib/workers/repository/reconfigure/index.ts b/lib/workers/repository/reconfigure/index.ts index b27e7b5e50613a..abdb1d014649c0 100644 --- a/lib/workers/repository/reconfigure/index.ts +++ b/lib/workers/repository/reconfigure/index.ts @@ -1,5 +1,6 @@ import is from '@sindresorhus/is'; import JSON5 from 'json5'; +import { GlobalConfig } from '../../../config/global'; import type { RenovateConfig } from '../../../config/types'; import { validateConfig } from '../../../config/validation'; import { logger } from '../../../logger'; @@ -43,6 +44,13 @@ export async function validateReconfigureBranch( config: RenovateConfig, ): Promise { logger.debug('validateReconfigureBranch()'); + if (GlobalConfig.get('platform') === 'local') { + logger.debug( + 'Not attempting to reconfigure when running with local platform', + ); + return; + } + const context = config.statusCheckNames?.configValidation; const branchName = getReconfigureBranchName(config.branchPrefix!); diff --git a/package.json b/package.json index 0aafde8cc35ca1..a2c94c318a77e6 100644 --- a/package.json +++ b/package.json @@ -335,7 +335,7 @@ "nyc": "17.0.0", "pretty-format": "29.7.0", "rimraf": "6.0.1", - "semantic-release": "24.0.0", + "semantic-release": "24.1.0", "tar": "7.4.3", "tmp-promise": "3.0.3", "ts-jest": "29.2.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a6d3f23796fb0..08cc62108d9061 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -372,7 +372,7 @@ importers: version: '@renovatebot/eslint-plugin@file:tools/eslint' '@semantic-release/exec': specifier: 6.0.3 - version: 6.0.3(semantic-release@24.0.0(typescript@5.5.4)) + version: 6.0.3(semantic-release@24.1.0(typescript@5.5.4)) '@swc/core': specifier: 1.7.11 version: 1.7.11 @@ -590,8 +590,8 @@ importers: specifier: 6.0.1 version: 6.0.1 semantic-release: - specifier: 24.0.0 - version: 24.0.0(typescript@5.5.4) + specifier: 24.1.0 + version: 24.1.0(typescript@5.5.4) tar: specifier: 7.4.3 version: 7.4.3 @@ -5359,8 +5359,8 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} - semantic-release@24.0.0: - resolution: {integrity: sha512-v46CRPw+9eI3ZuYGF2oAjqPqsfbnfFTwLBgQsv/lch4goD09ytwOTESMN4QIrx/wPLxUGey60/NMx+ANQtWRsA==} + semantic-release@24.1.0: + resolution: {integrity: sha512-FwaE2hKDHQn9G6GA7xmqsc9WnsjaFD/ppLM5PUg56Do9oKSCf+vH6cPeb3hEBV/m06n8Sh9vbVqPjHu/1onzQw==} engines: {node: '>=20.8.1'} hasBin: true @@ -7917,7 +7917,7 @@ snapshots: '@sec-ant/readable-stream@0.4.1': {} - '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.0.0(typescript@5.5.4))': + '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.1.0(typescript@5.5.4))': dependencies: conventional-changelog-angular: 8.0.0 conventional-changelog-writer: 8.0.0 @@ -7927,7 +7927,7 @@ snapshots: import-from-esm: 1.3.4 lodash-es: 4.17.21 micromatch: 4.0.7 - semantic-release: 24.0.0(typescript@5.5.4) + semantic-release: 24.1.0(typescript@5.5.4) transitivePeerDependencies: - supports-color @@ -7935,7 +7935,7 @@ snapshots: '@semantic-release/error@4.0.0': {} - '@semantic-release/exec@6.0.3(semantic-release@24.0.0(typescript@5.5.4))': + '@semantic-release/exec@6.0.3(semantic-release@24.1.0(typescript@5.5.4))': dependencies: '@semantic-release/error': 3.0.0 aggregate-error: 3.1.0 @@ -7943,11 +7943,11 @@ snapshots: execa: 5.1.1 lodash: 4.17.21 parse-json: 5.2.0 - semantic-release: 24.0.0(typescript@5.5.4) + semantic-release: 24.1.0(typescript@5.5.4) transitivePeerDependencies: - supports-color - '@semantic-release/github@10.1.6(semantic-release@24.0.0(typescript@5.5.4))': + '@semantic-release/github@10.1.6(semantic-release@24.1.0(typescript@5.5.4))': dependencies: '@octokit/core': 6.1.2 '@octokit/plugin-paginate-rest': 11.3.0(@octokit/core@6.1.2) @@ -7964,12 +7964,12 @@ snapshots: lodash-es: 4.17.21 mime: 4.0.4 p-filter: 4.1.0 - semantic-release: 24.0.0(typescript@5.5.4) + semantic-release: 24.1.0(typescript@5.5.4) url-join: 5.0.0 transitivePeerDependencies: - supports-color - '@semantic-release/npm@12.0.1(semantic-release@24.0.0(typescript@5.5.4))': + '@semantic-release/npm@12.0.1(semantic-release@24.1.0(typescript@5.5.4))': dependencies: '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 @@ -7982,11 +7982,11 @@ snapshots: rc: 1.2.8 read-pkg: 9.0.1 registry-auth-token: 5.0.2 - semantic-release: 24.0.0(typescript@5.5.4) + semantic-release: 24.1.0(typescript@5.5.4) semver: 7.6.3 tempy: 3.1.0 - '@semantic-release/release-notes-generator@14.0.1(semantic-release@24.0.0(typescript@5.5.4))': + '@semantic-release/release-notes-generator@14.0.1(semantic-release@24.1.0(typescript@5.5.4))': dependencies: conventional-changelog-angular: 8.0.0 conventional-changelog-writer: 8.0.0 @@ -7998,7 +7998,7 @@ snapshots: into-stream: 7.0.0 lodash-es: 4.17.21 read-package-up: 11.0.0 - semantic-release: 24.0.0(typescript@5.5.4) + semantic-release: 24.1.0(typescript@5.5.4) transitivePeerDependencies: - supports-color @@ -12367,13 +12367,13 @@ snapshots: sax@1.4.1: {} - semantic-release@24.0.0(typescript@5.5.4): + semantic-release@24.1.0(typescript@5.5.4): dependencies: - '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.0.0(typescript@5.5.4)) + '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.1.0(typescript@5.5.4)) '@semantic-release/error': 4.0.0 - '@semantic-release/github': 10.1.6(semantic-release@24.0.0(typescript@5.5.4)) - '@semantic-release/npm': 12.0.1(semantic-release@24.0.0(typescript@5.5.4)) - '@semantic-release/release-notes-generator': 14.0.1(semantic-release@24.0.0(typescript@5.5.4)) + '@semantic-release/github': 10.1.6(semantic-release@24.1.0(typescript@5.5.4)) + '@semantic-release/npm': 12.0.1(semantic-release@24.1.0(typescript@5.5.4)) + '@semantic-release/release-notes-generator': 14.0.1(semantic-release@24.1.0(typescript@5.5.4)) aggregate-error: 5.0.0 cosmiconfig: 9.0.0(typescript@5.5.4) debug: 4.3.6