Skip to content
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

fix: Fix filepath setup #198

Merged
merged 1 commit into from
May 28, 2024
Merged

fix: Fix filepath setup #198

merged 1 commit into from
May 28, 2024

Conversation

michaeljguarino
Copy link
Member

With the new mountPath spec, you can assume users specify a full/correct path in harness

@michaeljguarino michaeljguarino added the enhancement New feature or request label May 27, 2024
@michaeljguarino michaeljguarino requested a review from a team May 27, 2024 18:57
@michaeljguarino michaeljguarino changed the title Fix filepath setup fix: Fix filepath setup May 27, 2024
@github-actions github-actions bot added size/S and removed size/XS labels May 27, 2024
@michaeljguarino michaeljguarino force-pushed the fix-filepath-setup branch 4 times, most recently from 0d38aa8 to cd8319c Compare May 27, 2024 20:43
With the new mountPath spec, you can assume users specify a full/correct path in harness
@@ -38,7 +36,7 @@ func (in *environment) prepareFiles() error {
}

for _, fragment := range in.stackRun.Files {
destination := path.Join(in.filesDir, fragment.Path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC it will require user to provide full path including harness working dir, i.e. /plural/tf-test/.... Isn't it more prone to errors? Any other root level dir than /plural will not work currently.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to specify . as the mount path, and then it would be something like ./creds.json. I do think we should probably make some other folders writable though i just can't think of which at the moment (also think there probably will need to be a home folder for the user).

The problem I faced though was I didn't know the path at config-time at first, so it was a bit tricky to set things like GOOGLE_APPLICATION_CREDENTIALS properly, if you have full understanding of the path that's more straightforward.

@michaeljguarino michaeljguarino merged commit 7474456 into main May 28, 2024
15 checks passed
@michaeljguarino michaeljguarino deleted the fix-filepath-setup branch May 28, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants