ByteCode.NewsSubmit
Use quotes for an exact word.

Subscribe

RSSPodcast
Log in

Chat Logs

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