phalethhere just use buildkit already, the deamon is running on the VPS and is managed by systemd https://repopack.com/project/repopack/tasks/737 no need to do any short term solution, buildah is inferior
* lioloc joined #repopack
bluehi phaleth
* lioloc quit (Read error: Connection reset by peer)
bluewhy would you wanna force push to a task branch?
bluejust add commits on top. it all gets squashed in the end anyway
phalethwhen screwing up something and not wanting to make another commit, git commit --amend is a thing for a reason
phalethyeah, but for the reviewer it's pain in the butt if they review locally, which they should
bluethe problem with amending commits on a task branch is that it rewrites history. it's probably ok as long as the task is in ACTIVE, but after it's been submitted to a REVIEW, it's weird
blueI'll see if I can create a task for it that makes sense
blue"I think you and phaleth are talking past each other. Repopack already permits a force-push to a task branch by its owner while the task is active—including after git commit --amend. It rejects pushes during review or ready; the owner must run rp task revise <number> before changing a submitted branch. Other users, including maintainers, cannot push to someone else’s task branch without an ownership
bluehandoff."
blueshould be working for you phaleth
phalethwell I'm forced to do `rp task revise` anyway
blue"His fetch/pull problem may be separate. If he reset away local commits that were never pushed, fetching cannot recover them; git reflog may. If they were pushed, we need the exact branch, task status/owner, and Git rejection text to tell why the push failed. I wouldn’t create a policy-change task yet—first ask him for those details."
phalethok so that means I didn't revise
blueyes
phalethbut can the error tell me to do revise in some more understandable way?
bluethen we can also decide if we use --build-arg or --arg flags.
blueand also whether we rename `rp job args ...` to `rp job build-args ...`
phalethok, so one task for jobs and another for app deployments
blueyes
phalethbut what I don't know is how env vars are used
bluehold on, let me clarify then
blueApps: rp app env set stores a write-only value. You bind its key to an App unit, and Repopack injects it when the container runs, not while its image builds. “Write-only” means the value cannot be read back through Repopack; it does not make it a safe build secret.
phaleth`rp job args` will stay as is
blueenv -> runtime
phalethah, ok, that's right
blueJobs: Today, rp job run --build-arg NAME=VALUE supplies a non-secret Containerfile build argument. It does not become a runtime env var or script argument. Image-mode Jobs currently have no equivalent per-Run runtime input mechanism.
phalethI thought env is runtime thing
blueit is
blueSo these are separate concepts. If we add stock-image Jobs that run repository scripts, we can design runtime arguments for those Jobs—and decide their CLI name then. Build-time secrets would need their own safe mechanism.
phalethok, and how to distinguish? --build-arg --build-arg-secret ?
phalethpodman build also accepts ENV, that could be always write only
blueyeah, we should create the two tasks and discuss there what's needed
phalethactually no, podman build does not accept ENV
bluefor jobs I haven't needed secrets yet
bluebut it could be a use case
phalethENV variables are embedded in the image metadata and visible to anyone who can inspect
blueya
phalethwell, how does for example the migration script primate generates work then?
phalethit bakes in secrets that means secrets end up in image layer
phalethfor us that is fine, but outside user would not want us have their secrets
phalethNever use ENV for secrets.
phalethduring image build that is
blue"That script can be in the image without baking in the credential. Repopack’s App env bindings are injected at container runtime, not image build time. If Primate’s generated script actually writes a database password or URL literally into the script or image, that’s a real issue to inspect"
phalethyeah, it has no clue obviously
blueI feel like we're talking about a few different things at once
phalethit just clankered a security problem
phalethyeah, I know, three different things
blueapps have envs, those are secrets
bluethose are write-only; you cannot read htem again over the cli
bluethey're also encrypted
blue`rp app env`
phalethyeah, that's understood
blueok, there we don't need changes, right?
* lioloc joined #repopack
phalethright, it's just using podman run -e under the hood
phalethor the related podman REST API
blueyes
blueso that's ok. what's next?
phalethlets just go back to jobs for a moment
blueok
phalethright now they are running within podman image build mostly
phalethonly after that's over artifacts are somehow extracted
phalethjobs have dependencies, for those it'd be nice if the user could say I wanna cache that step cause it's expensive and you guys charge me for job time
phalethbut then the artifact production itself should not be cached cause it also requires the source code as second input
phalethbuild-args that are not secrets might be fine unless those dependencies need to be fetched from some repository requiring auth
phalethor the source code is not hosted on repopack at least partially
phalethso it's good that there is cache currently but also bad cause we have to clear it and it's not controlled by the user what gets cached
phalethand now that means simple sh script won't do, there have to be some stages to the job
phalethalso I wanna bring my own stock image should be a usecase
phalethalso how do we isolate builds, I think runsc can be used as runtime for containers as well as runtime for podman builds, but I don't really remember testing that after bugs got fixed in podman 6
phalethalso the default stock image should just be alpine, not negotiable, if clanker can solve that one issue then lets bother it with apps
phalethI think clanker has no chance there :)
phalethalso you may say that runsc will be slow, for us we should still have option to use crun
phalethcouple weeks ago I was thinking of documenting how to use an ephemeral builder in a separate disposable VPS, but if runsc is an option for builds
phalethnice, clanker is gonna invent new scripting language to let people identify caches
phalethit's prolly gonna argue that podman is not the right thing to use for this kind of problem
blueit's all complexity, why do we need this
blueit's currently working well, no?
phalethcaching is hard, but we need security
phalethand if people are running long running jobs and cannot optimize via caching then that's a problem
phalethbut currently we don't need those two, sure
bluepeople on free plans are gonna pretty limited anyway
blueso for now we leave it as `rp job args` but `rp job run --build-arg`, yes?
phalethwell, just consider at least moving from build time to runtime and take sh script as input
bluemove what from build time to runtime?
phaleth`rp job args` but `rp job run --arg ...`
blueso you wanna change from --build-arg to --arg, ya?
bluethat's ok for a small change for now
phalethwhatever is currently defined in Containerfile should be defined in sh sript and then the container that runs the sh script can be executed using runsc to improve security
phalethand there should be two stock images available alpine and debian
blueI'm not sure I understand. what change do we want for now?
phalethinstead there should just be a choice of alpine or debian
bluebut plain alpine or debian doesn't contain go
phaleththen all that heavy lifting should be executed via user defined sh script using `podman run -rm --runtime=runsc ...` (flags might be incorrect) behind the scenes
phalethwell, you can make go images available if you want
phaleththe point is the list is limited to trusted images
phalethand so for us the --runtime or whatever is the correct flag anyway should be chooseable to crun
bluebut then we need to maintain an eternally long list of trusted images
phalethcompared to that node is pain in the butt to install in image build :)
bluebut this is the approahc you should proposed replacing. it requires the ability to control the containerfile
bluehold on
phalethyeah, sorry, I mean they should do that in the sh script
phalethbut you know if podman build accepts the runtime and does not fail then Containerfiles can still be used and so the layer caching mechanism of the podman build as well
blueI don't know if I want to maintain trusted images, however I have another idea
phalethyeah, I also think letting people use Containerfiles is great idea
phalethno problem, added some comments that give reasons why to do all that
bluealright
phalethwell, wish I could edit comments, but whatever, clanker might understand
bluejust post a new coment
phalethyeah
phalethhope that makes sense, after jobs are implemented then apps can also use the same approach
phaleththis way we get security, cache and also the user can choose what to cache such that the cache isn't lost in case repopack stays on the same machine
bluenice
blueya, makes sense
phalethargs can be moved from underneath `rp job` later
phalethenv can be moved from underneath wherever it is later
bluemoved where?
phalethrp app env
phalethnot sure, env is now app specific and args is job specific
phalethand both jobs and apps should be able to use args and env
phalethto project maybe?
phalethor just have both in two places rp job and rp apps in the CLI cause of multiple jobs and apps having inputs of same name
blueya maybe
phalethor have them in their own space in the cli, but require job or app as input
blueI'd be wary of keeping general secrets per project and not scoped to app
phalethyeah, true
phalethalso there are now releases which is like a third category I guess