Repository navigation
Repository URL in appendix is no longer substituted - #2129
agahkarakuzu wants to merge 2 commits into
Conversation
|
Hi @agahkarakuzu, Thanks for the pull request. I was thinking, why could not be the default? |
|
Hi @rgaiacs! One issue is that adding it by default does not apply to repos with dockerfile. Also, people using c.BuildExecutor.appendix would replace those defaults instead of appending to them. On the other hand, I checked repo2docker picked_buildpack.labels, and they are always present (dockerfile or not), so for a permanent fix maybe it is a better place? Bottomline, I think this PR restores documented behaviour, and standard OCI labels are a separate improvement that probably belongs in repo2docker. If you'd rather have a l BinderHub-side default anyway, I'm glad to add it, but I'd want to solve the problem I mentioned first, e.g. a separate |
Problem
I run a few public BinderHubs (https://terrarium.evidencepub.io, https://live.evidencepub.io). Recently, I switched my registry (https://registry.evidencepub.io) to zot as part of an infrastructure migration, and while I was at it, I wanted to use
BuildExecutor.appendixto stamp OCI labels onto built images, so that it is more aligned with the spirit of " reproducible publishing":After a build I went looking for those labels in my registry and found them set to the literal strings. The build log confirms:
Why?
BinderHub.appendixdocuments the value as a string template:and
examples/appendix/binderhub_config.pystill depends on that:But nothing really formats it.
build.pyhands the value straight to repo2docker:Tracing it back, the formatting used to live in
builder.py:Relevance
#1518 moved build parameters to traitlets and left that line commented out on the new code path.Later on, 451059c deleted the commented line as dead code.
How can this PR be tested?
I have not added an automated test, but this reproduces in a couple of minutes with the local dev config, I ran it with
enable_api_only_mode:Adding to
binderhub_config.py:Then:
Before:
After:
Note: use a repo that does NOT contain a Dockerfile. I realized that repo2docker only supports the appendix in the template-generating buildpacks...
I know @rgaiacs is working hard to make it all wasm ready, but we still rely heavily on Binderhub and containers :)
Thank you so much!