feature:attach

Introduction

feature:attach pins a released version of a feature in the selected product and installs it in the running app. Use it to adopt a release, or to move a pin to a newer one.

splent feature:attach splent-io/splent_feature_notes v1.2.0
  notes@v1.2.0 attached
    reinstalling in web container...
  done.
What feature:attach fetches and what it changes in the product SOURCE PRODUCT RUNNING APP Forge the release tag cloned if missing Feature cache .splent_cache/features/ <ns>/<feature>@<version>/ read-only <product>/ pyproject.toml the entry, pinned to the version features/<ns>/<feature>@<version> a symlink to the cached copy splent.manifest.json declared, mode pinned Web container pip install -e then Flask reloads
The product links to a read-only snapshot of the release in the cache, fetched from the forge the first time.

A release missing from the cache is cloned from its tag first. The app reloads with no product:derive. Comments, blank lines, key order and quote style stay as they were in pyproject.toml.


Moving a pin to a new release

splent feature:attach splent-io/splent_feature_notes v1.3.0

The new version takes the old one’s place in the same list, next to the same comment. The old symlink and manifest entry go.

  replacing splent-io/splent_feature_notes@v1.2.0 in features
  notes@v1.3.0 attached

Attaching for one environment

splent feature:attach splent-io/splent_feature_notes v1.2.0 --dev

--dev declares it in features_dev and --prod in features_prod. Without either, the env of the release’s contract decides, and a feature already declared keeps its lists.


Attaching a release with a PyPI name of its own

A release published under a PyPI name of its own keeps its import name in the pin. Its PyPI name goes to [tool.splent.distributions], so the production image knows what to install. feature:detach drops it again.

[tool.splent.distributions]
splent_feature_notes = "splent-feature-notes-alice"

A product with a deploy bundle gets it written again for the new pin. See After a pin changes.


Reference

Argument or option Description
FEATURE_IDENTIFIER <namespace>/<feature>, or <feature> for splent-io
VERSION The release tag, such as v1.2.0
--dev Declare it in features_dev
--prod Declare it in features_prod
Message Exit What to do
<feature> has no version <version> on the forge 1 Run splent feature:versions <feature>
<short>@<version> already in <list>. 0 Nothing to do
<path> was left as it was, because <reason> 1 Make the edit by hand. Nothing was written
web container ... is not running; skipping hot reinstall. 0 Start the product with product:up

Requirements

  • A selected product (SPLENT_APP).
  • The version in .splent_cache, or tagged on the forge.

See also


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es