Repository navigation
Accept a conditional tty variable in build.sh; track build-local.sh - #101
Draft
rob-metalinkage wants to merge 4 commits into
Draft
rob-metalinkage wants to merge 4 commits into
rob-metalinkage wants to merge 4 commits into
Conversation
- ensure_build_script_interactive: a docker run argument such as ${TTY}
counts as -it when build.sh assigns -it to that variable (bblocks-template's
TTY=$([ -t 0 ] && [ -t 1 ] && echo -it)), instead of rewriting it to
`docker run -it ${TTY}`, which breaks non-interactive callers again
- tracked_template_files.txt: add build-local.sh (skipped until it exists
in bblocks-template)
- README: developing against a local build of an imported register (single
base-URL mapping + build-local/register.json probe), build.sh wrappers
- tests for the -it detection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
get_github_repo required the remote URL to end in `.git`, so a checkout cloned as `https://github.com/org/repo` (no suffix) silently got no autodetected base URL / GitHub base URL - and a build run with an empty --base-url (e.g. bblocks-template's build-local.sh) produced a register with no baseURL. Make the suffix (and a trailing slash) optional, fix the unescaped `www` / `.` in the pattern, and add tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A local build (build.sh) is stamped with the viewer base URL http://localhost:9090/register/, shared by every local build and not served during a build. A register importing such a build through a url-mapping then followed links to localhost and failed. The workaround, building the upstream with its public base URL (build-local.sh), broke the upstream's own viewer. Files served from a mapped checkout's build-local/ now have that build's baseURL rewritten to the mapped URL, so one mapping (public URL -> checkout) resolves everything, and the same build still works in the viewer. build-local.sh is no longer needed and is dropped from the tracked template files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rob-metalinkage
marked this pull request as draft
October 23, 2026 05:58
rob-metalinkage
added a commit
to opengeospatial/bblocks-template
that referenced
this pull request
Oct 23, 2026
… output The postprocessor now rewrites a mapped upstream's local viewer URLs onto the mapped URL (opengeospatial/bblocks-postprocess#101), so an upstream no longer needs a separate build with its public base URL, which broke its own viewer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rob-metalinkage
added a commit
to rob-metalinkage/ogc-llm-skills
that referenced
this pull request
Oct 23, 2026
Drop build-local.sh. The postprocessor now rewrites a mapped upstream's local viewer URLs onto the mapped URL (opengeospatial/bblocks-postprocess#101), so upstreams no longer need a public-base-URL build, which broke their own viewer. Document the workaround for older images, and the empty-mount failure when the terminal is not in the real checkout (e.g. a Docker Desktop bind-mount copy), which breaks relative .volumes paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build.sh) is stamped with the viewer base URLhttp://localhost:9090/register/. Every local build shares it, and nothing serves it during a build. When a downstream register imported such a build through a url-mapping, it followed links tolocalhost:9090and failed.http_interceptor.load_contentnow rewrites that build'sbaseURL(read from<checkout>/build-local/register.json) to the mapped URL in files served from a mapped checkout'sbuild-local/. Each upstream is rebased onto its own mapping, so chains of local builds don't collide. Files outsidebuild-local/, builds already stamped with the mapped URL, and mappings to export directories are left alone. New tests intests/test_http_interceptor_rebase.py.ensure_build_script_interactiveaccepts a conditional tty variable. Adocker runargument like${TTY}/$TTYnow counts as-itwhenbuild.shassigns-itto that variable. Before, the check only recognised a literal-it/-i -t, so it would rewrite the template's new form (Only request a tty when attached to one; document local upstream builds bblocks-template#13) todocker run -it ${TTY}. That brings back the "input device is not a TTY" failure for agents, CI and scripts..gitare now recognised.get_github_repoonly matched remotes ending in.git. A checkout cloned ashttps://github.com/org/repotherefore got no autodetected base URL, silently. A build with an empty--base-url, then produced aregister.jsonwith nobaseURL. The.gitsuffix and a trailing slash are now optional, and the unescapedwww/.in the pattern is fixed. New tests intests/test_github_repo.py../build.sh. Itsbuild-local/stays usable in the upstream's own viewer.url-mappingsentry from the upstream's base URL to the mounted checkout. This works because the loader already probes<url>/build-local/register.jsonwhenever mappings are active.tests/test_template_sync.pycovers literal-it,-i/--ttypairs,${TTY}/$TTY/"${TTY}", a variable not set to-it, and both outcomes ofensure_build_script_interactive.Testing
bblocks-postprocess:latestimage venv, withpytestandpytest-mockinstalled: 203 passed. That includes the 7 newtest_template_sync.pytests, the 13 newtest_github_repo.pytests and the 5 newtest_http_interceptor_rebase.pytests.ogc/mounted over the image's/src/ogc: 3d-csdm-common built with plainbuild.sh(baseURLhttp://localhost:9090/register/), then 3d-csdm-profile-icsm built against it with the single mappinghttps://surroundaustralia.github.io/3d-csdm-common/→ the common checkout. Result: exit 0, 4/4 blocks pass. With onlyregister.jsonrebased, the same build failed fetchinghttp://localhost:9090/register/build-local/annotated/...from common's annotated schemas, which is why the rewrite is in the interceptor.ensure_build_script_interactiveleaves the new templatebuild.shunchanged, along with four real downstream copies, one of which has aMSYS_NO_PATHCONV=1prefix.The template (opengeospatial/bblocks-template#13) now inlines the test as
docker run $([ -t 0 ] && [ -t 1 ] && echo -it ) ..., so already-released images accept it as a literal-it. The variable detection here covers the${TTY}form, which some repos already use.Merge before the template PR.
🤖 Generated with Claude Code