Commit Graph

9 Commits (2fed1b307ed01566a57f20717a1714253ac0019e)

Author SHA1 Message Date
Prathamesh Musale ac4a509d6f feat(k8s): decouple deployment-id from cluster-id
cluster-id plays two roles today: (a) which kind cluster this
deployment attaches to (used for the kube-config context name) and
(b) compose_project_name -> app_name, the prefix for every k8s
resource the deployment creates. _get_existing_kind_cluster() in
deploy create forces (a) to inherit the running cluster's name, and
because (a) and (b) are the same field, (b) inherits too — so two
deployments that share a cluster also share an app_name and collide
on every resource whose suffix isn't naturally distinct (PVs are
cluster-scoped; same-stack deployments collide there in particular).

Decouple: add a distinct `deployment-id` field. cluster-id keeps its
current behavior (inherit running cluster, else fresh). deployment-id
is always fresh per `deploy create`. K8sDeployer sources
kind_cluster_name from cluster-id and app_name from deployment-id.

Backward compatibility:
- Existing deployment.yml files have only cluster-id; no on-disk
  change until the next `deploy create`.
- DeploymentContext.init() falls back: deployment-id = cluster-id
  when the field is absent. Existing deployments keep their current
  app_name and resource names on next start — no PV renames, no
  re-binds, no data orphaning.
- `compose_project_name` parameter to K8sDeployer is retained (still
  used by the compose deployer path); only the k8s-side internals
  switch to deployment_context getters.
- The helm chart generator continues to derive chart names from
  cluster-id; untouched here, worth a follow-up for consistency.

Effect on woodburn: dumpster/rpc/trashscan each already carry a
distinct cluster-id in their deployment.yml (pre-`_get_existing_kind_cluster`
era). Under the fallback, they all adopt their existing cluster-id
as deployment-id, so resource names are identical to today.

Effect on new deployments: even when they share a running cluster
(kind-cluster-name in kube-config matches cluster-id), they get
distinct deployment-ids at deploy create, and thus distinct resource
name prefixes. The same-stack PV collision the namespace ownership
check surfaces goes away by construction.

Test: run-deploy-test.sh now reads deployment-id from the new field,
falling back to cluster-id for pre-decouple fixtures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 05:27:11 +00:00
A. F. Dudley d07a3afd27 Merge origin/main into multi-port-service
Resolve conflicts:
- deployment_context.py: Keep single modify_yaml method from main
- fixturenet-optimism/commands.py: Use modify_yaml helper from main
- deployment_create.py: Keep helm-chart, network-dir, initial-peers options
- deploy_webapp.py: Update create_operation call signature

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:48:11 -05:00
A. F. Dudley ffa00767d4 Add extra_args support to deploy create command
- Add @click.argument for generic args passthrough to stack commands
- Keep explicit --network-dir and --initial-peers options
- Add DeploymentContext.get_compose_file() helper
- Add DeploymentContext.modify_yaml() helper for stack commands
- Update init() to use absolute paths

This allows stack-specific create commands to receive arbitrary
arguments via: laconic-so deploy create ... -- --custom-arg value

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 03:06:45 -05:00
A. F. Dudley cd3d908d0d Apply pre-commit linting fixes
- Format code with black (line length 88)
- Fix E501 line length errors by breaking long strings and comments
- Fix F841 unused variable (removed unused 'quiet' variable)
- Configure pyright to disable common type issues in existing codebase
  (reportGeneralTypeIssues, reportOptionalMemberAccess, etc.)
- All pre-commit hooks now pass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:58:31 -05:00
Roy Crihfield ccccd9f957 Pass extra args to custom create command (#972)
Publish / Build and publish (push) Failing after 5s Details
Deploy Test / Run deploy test suite (push) Failing after 2s Details
Smoke Test / Run basic test suite (push) Failing after 2s Details
Lint Checks / Run linter (push) Failing after 2s Details
Webapp Test / Run webapp test suite (push) Failing after 2s Details
This is needed to allow custom deploy commands to handle arbitrary args.

* Adds a `DeploymentContext.modify_yaml` helper
* Removes `laconicd` from test stack to simplify it

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/972
Reviewed-by: ashwin <ashwin@noreply.git.vdb.to>
2025-11-25 03:05:35 +00:00
Roy Crihfield 34f3b719e4 Path is not a context manager in python 3.13 (#971)
Publish / Build and publish (push) Failing after 9s Details
Deploy Test / Run deploy test suite (push) Failing after 3s Details
Lint Checks / Run linter (push) Failing after 2s Details
Webapp Test / Run webapp test suite (push) Failing after 2s Details
Smoke Test / Run basic test suite (push) Failing after 3s Details
Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/971
Reviewed-by: rachmaninovquar <rachmaninovquar@noreply.git.vdb.to>
2025-10-16 17:55:44 +00:00
David Boreham 15faed00de
Generate a unique deployment id for each deployment (#680)
Publish / Build and publish (push) Successful in 1m8s Details
Deploy Test / Run deploy test suite (push) Successful in 3m13s Details
K8s Deploy Test / Run deploy test suite (push) Failing after 3m16s Details
Webapp Test / Run webapp test suite (push) Failing after 3m44s Details
Smoke Test / Run basic test suite (push) Successful in 4m40s Details
* Move cluster name generation into a function

* Generate a unique deployment id for each deployment
2023-12-05 22:56:58 -07:00
David Boreham d7093277b4
Use constants (#671) 2023-11-29 20:50:53 -07:00
David Boreham 5e91c2224e
kind test stack (#629)
Publish / Build and publish (push) Successful in 58s Details
Deploy Test / Run deploy test suite (push) Successful in 3m7s Details
Webapp Test / Run webapp test suite (push) Failing after 3m37s Details
Smoke Test / Run basic test suite (push) Successful in 4m1s Details
2023-11-08 01:11:00 -07:00