Skip to content

chore: add workspace-env/workspace-local targets for local stack testing#12

Merged
bjoaquinc merged 1 commit into
develfrom
chore/workspace-local-stack-targets
Jul 10, 2026
Merged

chore: add workspace-env/workspace-local targets for local stack testing#12
bjoaquinc merged 1 commit into
develfrom
chore/workspace-local-stack-targets

Conversation

@bjoaquinc

@bjoaquinc bjoaquinc commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds Makefile targets to test dlthub workspace connect against a local/dev/stage stack. dlthub-init has no --api-base-url flags, so these scaffold a workspace and then pin api_base_url / auth_base_url under [runtime] in .dlt/config.toml (where connect reads them). Manual-test tooling only — no runtime changes.

  • make workspace-env: scaffold, then pin API_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: add workspace-env / workspace-local targets and .PHONY entries.
  • scripts/pin_workspace_urls.py: new helper, idempotently upserts both keys under [runtime].

Testing

  • make -n workspace-local: expands to workspace-env and invokes the script as expected.
  • Ran the script on a sample config — keys inserted under [runtime], existing keys preserved; re-run with new values updates in place, no duplicates. ✅

🤖 Generated with Claude Code

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>
@bjoaquinc
bjoaquinc merged commit b06d0ce into devel Jul 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant