chore: add workspace-env/workspace-local targets for local stack testing#12
Merged
Merged
Conversation
Adds `make workspace-env` and `make workspace-local` for exercising `dlthub workspace connect` against a local/dev/stage stack. dlthub-init never talks to a stack while scaffolding, so it has no --api-base-url/--auth-base-url flags. These targets scaffold a workspace and then pin api_base_url/auth_base_url under [runtime] in the generated .dlt/config.toml (via scripts/pin_workspace_urls.py), which a subsequent `dlthub workspace connect` reads. pin_workspace_urls.py is idempotent: it upserts each key in place, creating the [runtime] section if absent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Adds Makefile targets to test
dlthub workspace connectagainst a local/dev/stage stack.dlthub-inithas no--api-base-urlflags, so these scaffold a workspace and then pinapi_base_url/auth_base_urlunder[runtime]in.dlt/config.toml(whereconnectreads them). Manual-test tooling only — no runtime changes.make workspace-env: scaffold, then pinAPI_BASE_URL/AUTH_BASE_URL(errors if unset).make workspace-local: wrapper pointing at the local stack (api/auth.dlthub.test, insecure TLS).Changes
Makefile: addworkspace-env/workspace-localtargets and.PHONYentries.scripts/pin_workspace_urls.py: new helper, idempotently upserts both keys under[runtime].Testing
make -n workspace-local: expands toworkspace-envand invokes the script as expected.[runtime], existing keys preserved; re-run with new values updates in place, no duplicates. ✅🤖 Generated with Claude Code