ByteCode.NewsSubmit
Use quotes for an exact word.

Subscribe

RSSPodcast
Log in

Chat Logs

  1. phaleththe VPS got beefier
  2. phalethflog trust me bro script now works, but primate repo has some old version of flog.lock
  3. phalethflog: error: /home/user/primate/primate/flog.lock: unsupported flog.lock version 0 (expected 1)
  4. phaleththere is a change in the making https://repopack.com/project/primate/tasks/236#flog.lock
  5. 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
  6. bluehi phaleth
  7. phalethdamn, cannot force push
  8. phalethand git fetch git pull isn't getting the commits I've reset locally
  9. bluewhere, phaleth?
  10. phalethcannot force push to a feature branch
  11. phaleththat's too restrictive
  12. phalethI mean task branch
  13. bluewhy would you wanna force push to a task branch?
  14. bluejust add commits on top. it all gets squashed in the end anyway
  15. phalethwhen screwing up something and not wanting to make another commit, git commit --amend is a thing for a reason
  16. phalethyeah, but for the reviewer it's pain in the butt if they review locally, which they should
  17. 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
  18. blueI'll see if I can create a task for it that makes sense
  19. 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
  20. bluehandoff."
  21. blueshould be working for you phaleth
  22. phalethwell I'm forced to do `rp task revise` anyway
  23. 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."
  24. phalethok so that means I didn't revise
  25. blueyes
  26. phalethbut can the error tell me to do revise in some more understandable way?
  27. bluewhat error did you get?
  28. phalethafter amend I did this https://paste.debian.net/plainh/2a2daa96
  29. phalethand it suggested nonsense so I executed that and obviously got rejected
  30. phalethhow can I tell primate website image build on repopack site to use specific arg? ARG FLOG_VERSION="0.1.0"
  31. phalethyou've mentioned 0.1.1 is released
  32. blueyes
  33. blueyou can configure args on a job
  34. phalethvia CLI? ok
  35. bluerun `rp job args` or `rp job args --help`
  36. bluegenerally: rp job args add <number> FLOG_VERSION
  37. blueyou can add a default with --default; if you don't, the arg is required
  38. blue<number> is the job number
  39. blueobviously you'd need to edit the Containerfile, but you know that
  40. phalethok, cool
  41. blueto provide the arg during run, use --build-arg
  42. blue→ rp job run
  43. blueusage: rp job run <job-number> [--source <ref>] [--build-arg NAME=VALUE]... [--attach]
  44. phalethwait, not for job, but for app
  45. phalethfor containerized deployment
  46. bluephaleth: there's already `rp task push .`. but you need a flag for force-push, as well
  47. bluehow about:
  48. bluerp task push . --replace-head
  49. bluethat good?
  50. phalethrp app args is not a thing
  51. phalethrp task push --force-with-lease
  52. blueyou need the .
  53. phalethrp task push <number> --force-with-lease
  54. blueand --force-with-lease is git terminology, I'd prefer we use something saner
  55. phalethwhat does the . mean there?
  56. phalethheh
  57. blue. means "the task branch I'm currently on"
  58. phalethoh :D
  59. phalethok, good to know
  60. blueit saves you remember the number
  61. blueremembering*
  62. phalethyeah
  63. phalethwell, alright no args passed to the deployment
  64. blueyeah, I need to see if we can add args to app deployment as well
  65. blueI'm gonna go with --replace-head, unless you have a better suggestion. but --force-with-lease means nohting to me, git has terrible DX
  66. phalethhttps://repopack.com/project/primate/tasks/238
  67. phaleththat's the usecase
  68. phalethyeah, but how can I remember --replace-head unless the error message tells me
  69. phaleththe problem is that the error message is suggesting wrong thing to do
  70. phalethand also nothing about revise
  71. bluehold on
  72. phalethyeah, no hurry
  73. bluephaleth: https://repopack.com/project/repopack/tasks/740
  74. blueis that ok?
  75. blue" A task in review, ready, or revision must give a direct rp task revise <number> instruction before a rewrite."
  76. blueI can do it now and release a new rp. I've been meaning to release a new rp anyway today
  77. blueprobably will be a 0.2.0
  78. phalethno idea, looks like a wall of text to me
  79. phalethnot sure if it says the user will be told to revise the task
  80. phalethlooks like it does not, so it's just spewed a lot of nonsense it seems
  81. blue12:23 < blue> " A task in review, ready, or revision must give a direct rp task revise <number> instruction before a rewrite."
  82. phalethalso clanker just spewed what I mentioned before at me here https://repopack.com/project/rcompat/tasks/86
  83. phalethyeah, that does not say user will be told about revise in error message
  84. phalethdoes the trust me bro script accept version as arg?
  85. blueyou mean flog.sh/install ?
  86. phalethyeah, looks like it does and that's what clanker means
  87. blueflog.run/install *
  88. phalethPass FLOG_VERSION="$FLOG_VERSION" to the installer command itself
  89. phalethI feel like getting dummier and dummier the more I work with clanker
  90. bluephaleth: the problem with https://repopack.com/project/rcompat/tasks/86
  91. blueis that once flog updates, this build will fail
  92. bluethis is a correct observation by clankerhood
  93. bluetechnically it's the same problem here https://repopack.com/project/primate/tasks/238
  94. bluedo you need something like flog.run/install?version=XXX ?
  95. bluehold on
  96. bluetrying to understand
  97. phalethI cannot update flog#86
  98. bluesubmit it again
  99. blueI see, the trust me bro script supports FLOG_VERSION
  100. blueI missed that
  101. blueclanker apologised
  102. phalethheh
  103. phalethdamn primate#238 is already merged :D
  104. phalethwill create another one
  105. phalethbut I still cannot submit the change to flog#86 or rcompat#86? I don't know
  106. phalethrcompat#86
  107. bluercompat#86
  108. blue`rp task submit`
  109. blue`rp task submit .`
  110. bluedoesn't ework?
  111. phalethI mean not submit, but push commit to that task
  112. blueok let me fix repopack#740 first
  113. bluethat will improve your workflow
  114. blueyour latest note on repopack#740 will be accounted for in 740
  115. phalethwhy'd the clanker say it was wrong? on rcompat#86, it wasn't completely wrong
  116. phalethok, cool
  117. blueit wasn't wrong at all
  118. blueclanker hallucinated
  119. phalethyeah, also too bad it's spewing so much walls of text
  120. blueya
  121. phalethok, just make sure to merge https://repopack.com/project/primate/tasks/239 before new flog release
  122. blueflog 0.1.2 coming
  123. phalethI think once the branch gets restacked or whatever is the term then the work is busted
  124. phalethI mean the local branch
  125. bluedone
  126. blueyes, restacked
  127. bluealso rp 0.1.4 is soon coming with the 740 changes
  128. phalethnice :)
  129. phalethdo you want me to create repopack task for args to be passable to container image builds?
  130. phaleth`rp app args`
  131. phaleththere is already `rp app env set <app> <key>`
  132. phalethI mean `rp app env set <app> <key> --value-stdin`
  133. phalethI've set flog version env var for primate https://paste.debian.net/plainh/7940c836 we will see if 0.1.2 will be used on next deployment
  134. blueyes phaleth
  135. bluecreate a task please
  136. phalethyou think env var will not be applied? should give that a try I think
  137. bluewhere is that env var coming from?
  138. phalethnot sure what you mean, I've set that env var
  139. phalethhoping it will be passed to the image build via the --build-arg flag or whatever the rest API of podman uses
  140. phalethbut maybe those env vars are just a runtime thing, no clue
  141. phalethalso arg is a better name for this kind of thing since it's called ARG in the Containerfile as well
  142. bluebut only jobs supported --build-arg, is my point
  143. blueok, will change to --arg
  144. blueoh I see, you just used envs for apps. yes, that's correct
  145. phalethok, so these env vars are used both at buildtime and runtime?
  146. phalethdon't you think there should be a different mechanism for build and runtime
  147. phaleth--build-arg is good, that's descriptive and matches podman
  148. phalethand I think env vars should only be used at runtime, but then how to pass secrets to build if build requires secrets
  149. phaleththose env vars are already write only
  150. blueapps and jobs are different
  151. blueso should we do --build-arg or --arg for jobs?
  152. phalethjob is always running during a container build right?
  153. bluejob runs in a containre, yes
  154. blueand it's never long-running
  155. phalethI mean, it's always running as `podman build` not as `podman run -rm`
  156. blueyes
  157. bluewell, it's building an image
  158. bluethen runs it once
  159. phalethhmm, that's weird, it should just use a stock image and run things in a container spawned from that stock image
  160. phalethand then --arg would be appropriate
  161. phalethas runtime arg
  162. phalethI think `podman run -rm` should be the way, then the script the job runs can be just an sh script
  163. phalethactually can't remember if the flag to delete the container after it's done is `-rm`, but there is such flag
  164. phaleththat way we will not get a ton of podman build layers cached on the server
  165. bluephaleth: https://dpaste.com/HT5BZDQVS
  166. bluemaybe you can create a task for this?
  167. bluethen we can also decide if we use --build-arg or --arg flags.
  168. blueand also whether we rename `rp job args ...` to `rp job build-args ...`
  169. phalethok, so one task for jobs and another for app deployments
  170. blueyes
  171. phalethbut what I don't know is how env vars are used
  172. bluehold on, let me clarify then
  173. 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.
  174. phaleth`rp job args` will stay as is
  175. blueenv -> runtime
  176. phalethah, ok, that's right
  177. 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.
  178. phalethI thought env is runtime thing
  179. blueit is
  180. 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.
  181. phalethok, and how to distinguish? --build-arg --build-arg-secret ?
  182. phalethpodman build also accepts ENV, that could be always write only
  183. blueyeah, we should create the two tasks and discuss there what's needed
  184. phalethactually no, podman build does not accept ENV
  185. bluefor jobs I haven't needed secrets yet
  186. bluebut it could be a use case
  187. phalethENV variables are embedded in the image metadata and visible to anyone who can inspect
  188. blueya
  189. phalethwell, how does for example the migration script primate generates work then?
  190. phalethit bakes in secrets that means secrets end up in image layer
  191. phalethfor us that is fine, but outside user would not want us have their secrets
  192. phalethNever use ENV for secrets.
  193. phalethduring image build that is
  194. 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"
  195. phalethyeah, it has no clue obviously
  196. blueI feel like we're talking about a few different things at once
  197. phalethit just clankered a security problem
  198. phalethyeah, I know, three different things
  199. blueapps have envs, those are secrets
  200. bluethose are write-only; you cannot read htem again over the cli
  201. bluethey're also encrypted
  202. blue`rp app env`
  203. phalethyeah, that's understood
  204. blueok, there we don't need changes, right?
  205. phalethright, it's just using podman run -e under the hood
  206. phalethor the related podman REST API
  207. blueyes
  208. blueso that's ok. what's next?
  209. phalethlets just go back to jobs for a moment
  210. blueok
  211. phalethright now they are running within podman image build mostly
  212. phalethonly after that's over artifacts are somehow extracted
  213. 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
  214. phalethbut then the artifact production itself should not be cached cause it also requires the source code as second input
  215. phalethbuild-args that are not secrets might be fine unless those dependencies need to be fetched from some repository requiring auth
  216. phalethor the source code is not hosted on repopack at least partially
  217. 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
  218. phalethand now that means simple sh script won't do, there have to be some stages to the job
  219. phalethalso I wanna bring my own stock image should be a usecase
  220. 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
  221. phalethalso the default stock image should just be alpine, not negotiable, if clanker can solve that one issue then lets bother it with apps
  222. phalethI think clanker has no chance there :)
  223. phalethalso you may say that runsc will be slow, for us we should still have option to use crun
  224. 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
  225. blueok
  226. bluelet me review that
  227. phalethone sec
  228. phalethI have this in my notes https://paste.debian.net/plainh/217b1474
  229. phalethbut that's from the time when podman 6 wasn't a thing
  230. phaleththat means the stock image should be enforced and jobs should run at container runtime
  231. phaleththe caveat is when for example rp cli is built on alpine the cross-compilation requires cgo, on debian golang can cross-compile fine
  232. phalethso maybe there should be a limited choice of stock images for jobs
  233. bluetask incoming
  234. bluehttps://repopack.com/project/repopack/tasks/743
  235. phalethnice, clanker is gonna invent new scripting language to let people identify caches
  236. phalethit's prolly gonna argue that podman is not the right thing to use for this kind of problem
  237. blueit's all complexity, why do we need this
  238. blueit's currently working well, no?
  239. phalethcaching is hard, but we need security
  240. phalethand if people are running long running jobs and cannot optimize via caching then that's a problem
  241. phalethbut currently we don't need those two, sure
  242. bluepeople on free plans are gonna pretty limited anyway
  243. blueso for now we leave it as `rp job args` but `rp job run --build-arg`, yes?
  244. phalethwell, just consider at least moving from build time to runtime and take sh script as input
  245. bluemove what from build time to runtime?
  246. phaleth`rp job args` but `rp job run --arg ...`
  247. blueso you wanna change from --build-arg to --arg, ya?
  248. bluethat's ok for a small change for now
  249. 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
  250. phalethand there should be two stock images available alpine and debian
  251. blueI'm not sure I understand. what change do we want for now?
  252. phalethlet me give you an example
  253. blueok
  254. phalethhere you can see a Containerfile defining all the heavy lifting https://repopack.com/project/repopack/jobs/1?run=335
  255. phalethinstead there should just be a choice of alpine or debian
  256. bluebut plain alpine or debian doesn't contain go
  257. 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
  258. phalethwell, you can make go images available if you want
  259. phaleththe point is the list is limited to trusted images
  260. phalethand so for us the --runtime or whatever is the correct flag anyway should be chooseable to crun
  261. bluebut then we need to maintain an eternally long list of trusted images
  262. phalethyeah, and it's easy to install golang
  263. phalethRUN wget -c -O golang.tar.gz https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz && \
  264. phaleth tar -C /usr/local -xzf golang.tar.gz
  265. phalethENV PATH="/usr/local/go/bin:${PATH}"
  266. phalethcompared to that node is pain in the butt to install in image build :)
  267. bluebut this is the approahc you should proposed replacing. it requires the ability to control the containerfile
  268. bluehold on
  269. phalethyeah, sorry, I mean they should do that in the sh script
  270. 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
  271. blueI don't know if I want to maintain trusted images, however I have another idea
  272. phalethyeah, I also think letting people use Containerfiles is great idea
  273. bluerp image create go-toolchain --file ci/Containerfile.tools
  274. phalethso that means we will need an ephemeral builder
  275. bluerp image build go-toolchain
  276. bluerp job create cli-check --image go-toolchain@<version> --script ci/check.sh
  277. bluerp job run <job-number> --source <full-sha> --attach
  278. bluethat solves the caching issue, right?
  279. blueusers can create their own base images
  280. blueand then reuse them in a project
  281. phalethyeah, just not sure how the last two calls relate to each other
  282. phalethbut makes sense to have four steps
  283. bluethe first one defines a reusable job
  284. bluethe second starts a run against a git sha
  285. phalethok, so rp job create will return the job-number
  286. phalethrp job create runner then?
  287. phalethand rp job run --runner <number>
  288. bluerp job create <job-name> --image <image-name> --script <entry-script>
  289. bluerp job run <job-number> --source <sha> --attach
  290. bluethat's what I propose. right now create works differently
  291. bluerp job create release '{"source":"refs/heads/master","execution":{"mode":"containerfile","containerfile":"Containerfile.release","context":"."},"artifact_paths":["/release"]}'
  292. phalethrp job run <job-name> --source <sha> --attach
  293. phaleththen it's good
  294. blueI think run suppotrs both number and name
  295. phalethyeah, at least that sounds doable
  296. blueok
  297. phalethwill prolly be hard for people to realize they shouldn't do everything at image build time, but that's a different problem
  298. phalethsome will prolly just do two stage builds if <image-name> is available via FROM call in Containerfile, which is at least better
  299. phalethcause who can be bothered with an sh script
  300. blueya
  301. phaleththat means it boils down to having a container registry
  302. phalethwhich is also what I thought about
  303. blueimage registry? ya
  304. phaleththis explains how to setup registry in a container https://oneuptime.com/blog/post/2026-02-08-how-to-set-up-docker-registry-with-basic-auth-and-htpasswd/view
  305. phalethessentially it's just: `podman run -d -p 5000:5000 --name cr registry:3`
  306. phalethand also volume flags
  307. bluewhat do we need it for?
  308. bluewe can just keep images locally for now, no?
  309. phalethso we can store custom images
  310. phalethlocally stored images is not a good idea, actually I tend to clean them up alot cause of all these security issues that have been reported
  311. phalethand it's difficult to distinguish between what is used/valid and what is just already obsolete when it's all on a single pile
  312. blueya
  313. phalethalso the registry allows accounts to be used, not saying namespacing is not possible in image naming, but still
  314. blueya
  315. phalethrepopack could also manage the images by itself and as written in repopack#392 it should anyway
  316. bluephaleth: https://repopack.com/project/repopack/tasks/743
  317. bluecan you provide input on this
  318. phalethyeah, sure
  319. bluethanks phaleth
  320. phalethno problem, added some comments that give reasons why to do all that
  321. bluealright
  322. phalethwell, wish I could edit comments, but whatever, clanker might understand
  323. bluejust post a new coment
  324. phalethyeah
  325. phalethhope that makes sense, after jobs are implemented then apps can also use the same approach
  326. 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
  327. bluenice
  328. blueya, makes sense
  329. phalethargs can be moved from underneath `rp job` later
  330. phalethenv can be moved from underneath wherever it is later
  331. bluemoved where?
  332. phalethrp app env
  333. phalethnot sure, env is now app specific and args is job specific
  334. phalethand both jobs and apps should be able to use args and env
  335. phalethto project maybe?
  336. 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
  337. blueya maybe
  338. phalethor have them in their own space in the cli, but require job or app as input
  339. blueI'd be wary of keeping general secrets per project and not scoped to app
  340. phalethyeah, true
  341. phalethalso there are now releases which is like a third category I guess
  342. blueyes