Use a standard filesystem structure in all docker images#5625
Closed
deivid-rodriguez wants to merge 4 commits intomainfrom
Closed
Use a standard filesystem structure in all docker images#5625deivid-rodriguez wants to merge 4 commits intomainfrom
deivid-rodriguez wants to merge 4 commits intomainfrom
Conversation
f47ebb2 to
e31c7fa
Compare
Contributor
Author
|
I think the current failures happen because Maybe a patch like this would fix things diff --git a/internal/infra/updater.go b/internal/infra/updater.go
index 90ba236..103d603 100644
--- a/internal/infra/updater.go
+++ b/internal/infra/updater.go
@@ -153,6 +153,21 @@ func (u *Updater) InstallCertificates(ctx context.Context) error {
}
func userEnv(proxyHost string, apiPort int) []string {
+ inputDir := os.Getenv("DEPENDABOT_JOB_PATH")
+ if inputDir == "" {
+ inputDir = guestInputDir
+ }
+
+ outputDir := os.Getenv("DEPENDABOT_OUTPUT_PATH")
+ if outputDir == "" {
+ outputDir = guestOutputDir
+ }
+
+ repoDir := os.Getenv("DEPENDABOT_REPO_CONTENTS_PATH")
+ if repoDir == "" {
+ repoDir = guestRepoDir
+ }
+
return []string{
fmt.Sprintf("http_proxy=http://%s:1080", proxyHost),
fmt.Sprintf("HTTP_PROXY=http://%s:1080", proxyHost),
@@ -160,9 +175,9 @@ func userEnv(proxyHost string, apiPort int) []string {
fmt.Sprintf("HTTPS_PROXY=http://%s:1080", proxyHost),
fmt.Sprintf("DEPENDABOT_JOB_ID=%v", jobID),
fmt.Sprintf("DEPENDABOT_JOB_TOKEN=%v", ""),
- fmt.Sprintf("DEPENDABOT_JOB_PATH=%v", guestInputDir),
- fmt.Sprintf("DEPENDABOT_OUTPUT_PATH=%v", filepath.Join(guestOutputDir, fetcherOutputFile)),
- fmt.Sprintf("DEPENDABOT_REPO_CONTENTS_PATH=%v", guestRepoDir),
+ fmt.Sprintf("DEPENDABOT_JOB_PATH=%v", inputDir),
+ fmt.Sprintf("DEPENDABOT_OUTPUT_PATH=%v", filepath.Join(outputDir, fetcherOutputFile)),
+ fmt.Sprintf("DEPENDABOT_REPO_CONTENTS_PATH=%v", repoDir),
fmt.Sprintf("DEPENDABOT_API_URL=http://host.docker.internal:%v", apiPort),
fmt.Sprintf("SSL_CERT_FILE=%v/ca-certificates.crt", certsPath),
"UPDATER_ONE_CONTAINER=true",I'll wait for some input here in any case! |
Contributor
Author
|
By the way, this PR would also make #5609 unnecessary. |
140ceb4 to
74292a7
Compare
74292a7 to
cbdf68e
Compare
Closed
If the previous copies are correct, the ones after should be correct too.
Which also matches our repository structure.
cbdf68e to
5825c0f
Compare
Member
|
Stumbled across this... what's the plan here now that the docker images are split apart? I didn't review the code, as I figure you know off top of your head if this is still useful or not? |
Contributor
Author
|
I'm honestly not sure if still relevant, but I will check and close this if it's not! |
Contributor
Author
|
I don't think this is worth even revisiting, and I never got it working anyways. Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And make it the same as in our repository.
While working on improving #5617, I wanted to change the way we install native helpers to be like this:
So that no duplicated file trees at
/opt/<ecosystem>and/opt/<ecosystem>/helpersare generated.However, I believe this will generate similar confusing duplication at
/home/dependabot/dependabot-core/<ecosystem>/helpers, and/home/dependabot/<ecosystem>/helpersin the updater image.I want to experiment with unifying the layout across all images & the source repository.