You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Equivalent of {host { dir(id:...) { ... }}} in old API
I think we should consider dropping support for host directories beyond workdir. I'm sure there will be complaints, but my feeling is that most users won't need it, and it would make our life easier in the short term not to worry about it.
@shykes This was brought up as a need by @jlongtine for backwards compatibility.
Besides that I'm totally fine with starting w/out this API as I agree it providing it opens lots of tricky questions around security and such.
I can't immediately think of how to implement the old europa client API without this, but I also can barely remember many details of europa anymore so maybe I'm missing something.
I suppose it's technically possible to make europa a special case and give it some undocumented way of accessing this ability; but there's no way we can 100% hide it from others, only make it obscure, so someone will eventually find it and make use of it.
_#clientFilesystemRead and core.#Source will be impossible to port without this, FWIW. Which will break much of universe.dagger.io, which will also impact a decent number of the dagger.#Plans out there.
I think we should do a first pass where Classic returns an error when the plan requests an absolute path in client: filesystem. I believe most real-world plans use relative paths, which map well to workdir in cloak.
I say we ship this version, wait for feedback, then decide what to do based on the feedback. If nobody complains (high likelihood IMO) then the problem takes care of itself.
_#clientFilesystemRead and core.#Source will be impossible to port without this, FWIW. Which will break much of universe.dagger.io, which will also impact a decent number of the dagger.#Plans out there.
_#clientFilesystemRead with absolute path: yes that will break
_#clientFilesystemRead with relative path: that can be implemented with workdir
core.#Source: OK that I don't know how to deal with.
core.#Source is from under cue.mod right? I'm 99% sure the answer is no, but is there any way of recreating the contents of cue.mod inside buildkit without loading them from the localdir? Can we redownload them directly inside buildkit?
This is obviously awful in terms of performance, but I have to ask in case it's an option.
_#clientFilesystemRead with absolute path: yes that will break
💯
_#clientFilesystemRead with relative path: that can be implemented with workdir
This is only true if the relative path we are given is under the current workdir. All other cases, such as ../src, won't work.
core.#Source: OK that I don't know how to deal with.
I think it's a similar problem to the relative path. It could work if they're running from the root of the cue.mod, but not anything else. Also... not allowing our users the ability to give us focused directories to upload to Buildkit could get rather expensive. Lots of cache busting.
core.#Source is from under cue.mod right? I'm 99% sure the answer is no, but is there any way of recreating the contents of cue.mod inside buildkit without loading them from the localdir? Can we redownload them directly inside buildkit?
core.#Source isn't exclusive to cue.mod, no. You could have a folder as a part of your current module that held reusable components. Also, the user could have made changes to the cue.mod, which they would expect to be in the loaded CUE.
We tried to see if we could get away with not providing this ability in Europa, and came to the conclusion that didn't really have the option. I don't think we're getting out of needing this API.
Activity
shykes commentedon Sep 30, 2022
I think we should consider dropping support for host directories beyond workdir. I'm sure there will be complaints, but my feeling is that most users won't need it, and it would make our life easier in the short term not to worry about it.
wdyt?
sipsma commentedon Sep 30, 2022
@shykes This was brought up as a need by @jlongtine for backwards compatibility.
Besides that I'm totally fine with starting w/out this API as I agree it providing it opens lots of tricky questions around security and such.
I can't immediately think of how to implement the old europa client API without this, but I also can barely remember many details of europa anymore so maybe I'm missing something.
I suppose it's technically possible to make europa a special case and give it some undocumented way of accessing this ability; but there's no way we can 100% hide it from others, only make it obscure, so someone will eventually find it and make use of it.
Worth more thought
jlongtine commentedon Sep 30, 2022
_#clientFilesystemReadandcore.#Sourcewill be impossible to port without this, FWIW. Which will break much ofuniverse.dagger.io, which will also impact a decent number of thedagger.#Plans out there.shykes commentedon Sep 30, 2022
Ah you're right, I didn't think of Europa compat.
I think we should do a first pass where Classic returns an error when the plan requests an absolute path in
client: filesystem. I believe most real-world plans use relative paths, which map well toworkdirin cloak.I say we ship this version, wait for feedback, then decide what to do based on the feedback. If nobody complains (high likelihood IMO) then the problem takes care of itself.
cc @jlongtine
shykes commentedon Sep 30, 2022
_#clientFilesystemReadwith absolute path: yes that will break_#clientFilesystemReadwith relative path: that can be implemented withworkdircore.#Source: OK that I don't know how to deal with.sipsma commentedon Sep 30, 2022
core.#Sourceis from undercue.modright? I'm 99% sure the answer is no, but is there any way of recreating the contents ofcue.modinside buildkit without loading them from the localdir? Can we redownload them directly inside buildkit?This is obviously awful in terms of performance, but I have to ask in case it's an option.
jlongtine commentedon Oct 3, 2022
💯
This is only true if the relative path we are given is under the current
workdir. All other cases, such as../src, won't work.I think it's a similar problem to the relative path. It could work if they're running from the root of the
cue.mod, but not anything else. Also... not allowing our users the ability to give us focused directories to upload to Buildkit could get rather expensive. Lots of cache busting.core.#Sourceisn't exclusive tocue.mod, no. You could have a folder as a part of your current module that held reusable components. Also, the user could have made changes to thecue.mod, which they would expect to be in the loaded CUE.We tried to see if we could get away with not providing this ability in Europa, and came to the conclusion that didn't really have the option. I don't think we're getting out of needing this API.
vito commentedon Oct 12, 2022
Done via #3304