Repository navigation
Add service tags, run in several services, and SDK parity with the CLI - #28
Merged
Merged
Conversation
Services and infra services take `tags`, and `-t, --tag` picks them wherever `-s` does. `-s` names a service by its name or by a path on `start`, `service`, `exec` and `run`, and `exec` and `run` with `-s` or `-t` run one command in several services at once, the first failure stopping the rest unless `--ignore-sibling-error`. A service's `targetDir` is now `dir`, and the SDK's `target` option is `service`. `infra reset` with nothing named resets the profile's whole Compose project, with its lifecycle hooks. `reset` and `destroy` refuse, before any hook runs, what they couldn't remove: an external volume, a volume shared with a service not named, or a volume or network held by a container the run leaves in place. `infra stop` and `restart` act on enabled services only, and a disabled service named with `-s` is refused on every infra command but `destroy`. `start`, `restart` and `reset` take `--wait-timeout`. The SDK now does what the CLI does: `infra.*`, `service.*`, `stop`, `status`, `events`, `logs`, `resetProfile`, `showConfig`, `init`, and `attach` and `wait`, which return the stack of a session already running. Each runs the CLI command in a child process, which hands its result back on descriptor 3. The docs, the changelog's 0.11.0 section and the example config are updated to match.
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.
Releases 0.11.0.
tags, and-t, --tagpicks them wherever-sdoes.-snames a service by its name or by a path.execandrunwith-s/-trun one command in each, labelled, the first failure stopping the rest unless--ignore-sibling-error. The SDK'sexec()/run()have the same many form.infra resetwith nothing named resets the whole Compose project with its hooks;resetanddestroyrefuse up front what they couldn't remove;stop/restartact on enabled services only;--wait-timeoutonstart,restartandreset.infra.*,service.*,stop,status,events,logs,resetProfile,showConfig,init,attachandwait.targetDirisdir; the SDK'stargetoption isservice;findServiceis no longer exported.See CHANGELOG.md for the full list and the migrations.
Verification
pnpm buildpnpm lintpnpm test: 2867 passed, 1 skipped, no type errorspnpm test:e2e: 39 passedinfra/docker-compose.integration.spec.tsagainst real Docker: 19 passedpnpm docs:build: no dead linksnode maintenance/scripts/changelog.ts checknode maintenance/scripts/check-source-maps.ts