-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: Use centralized approach for per-repository file caches #10618
Conversation
This is minimal implementation to elaborate on |
lib/manager/gomod/artifacts.ts
Outdated
cacheDir: { | ||
execWithEnv: 'GOPATH', | ||
subPath: './others/go', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With these exec options, we can get rid of manual ensureCacheDir()
calling
lib/util/exec/docker/index.ts
Outdated
|
||
export async function deleteCacheVolume(): Promise<void> { | ||
const { dockerChildPrefix } = getAdminConfig(); | ||
const volumeNamespace = getContainerName('manager_cache', dockerChildPrefix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should rename getContainerName
to something more generic.
lib/util/exec/index.ts
Outdated
@@ -1,4 +1,5 @@ | |||
import type { ExecOptions as ChildProcessExecOptions } from 'child_process'; | |||
import { join as unixJoin } from 'path'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used only for inner Docker paths
lib/util/exec/index.ts
Outdated
rawExec, | ||
} from './common'; | ||
import { generateDockerCommand, removeDockerContainer } from './docker'; | ||
import { getChildProcessEnv } from './env'; | ||
|
||
type ExtraEnv<T = unknown> = Record<string, T>; | ||
|
||
interface CacheDirOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface CacheDirOption { | |
export interface CacheDirOption { |
lib/util/exec/docker/index.ts
Outdated
|
||
export async function deleteCacheVolume(): Promise<void> { | ||
const { dockerChildPrefix } = getAdminConfig(); | ||
const volumeNamespace = getContainerName('manager_cache', dockerChildPrefix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if docker mode, otherwise it fails on global mode, when no docker is available.
We should also add a new config option, as maybe not all users want those docker volumes, or override by some more persistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, it's just a blueprint
Would this be easier if you based it off my breaking PR which removes custom cache env? |
I wanted to achieve non-breaking behaviour for now, then restrict custom env-vars usage with separate breaking PR. |
…docker-exec-tests
ac438a7
to
fea9a6a
Compare
Removes standalone gradle-lite manager and merges it into the gradle manager as the default behavior, while adding deepExtract as an option to re-enable previous behavior. Closes renovatebot#10091 BREAKING CHANGE: Gradle extraction now defaults to JS-based parsing (previously "gradle-lite")
Removes support for "yarnrc" configuration option. Closes renovatebot#10113 BREAKING CHANGE: It is no longer supported to configure a "yarnrc" override in Renovate config
…0514) Defaults cloneSubmodules to false. BREAKING CHANGE: Git Submodules cloning now needs to be explicitly enabled.
Ignore environment variables and instead use static cache directory for third party tools. Closes renovatebot#10094 BREAKING CHANGE: Renovate will now override any package manager cache locations configured in env variables. # Conflicts: # lib/manager/gomod/__snapshots__/artifacts.spec.ts.snap # lib/manager/gomod/artifacts.ts
Defaults dependencyDashboard=true for anyone using the config:base preset
Removes double or more hyphens from branch names and replaces with a single hyphen. Closes renovatebot#8260 BREAKING CHANGE: Branches with double hyphens will be changed to single hyphens, which can result in some existing PRs being autoclosed and replacements opened.
@zharinov I maybe have a change of direction on this one, sorry. I would like to close this for now so you don't have to keep updating it from main |
Changes:
Context:
Closes #10526
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via:
Example repo: https://github.com/renovate-testing/test-10618-artifact-upgrades/pulls