Skip to content

Comments

fix(instances): propagate instance update (image/version/enabled) to …#78

Merged
digmunhoz merged 1 commit intomainfrom
fix/instance-sync
Feb 15, 2026
Merged

fix(instances): propagate instance update (image/version/enabled) to …#78
digmunhoz merged 1 commit intomainfrom
fix/instance-sync

Conversation

@digmunhoz
Copy link
Contributor

Description

Instance updates via PUT /organizations/{uuid}/instances/{uuid} were only persisted in the database and not reflected in the Kubernetes cluster. This PR fixes that by calling sync_instance after a successful instance update when image, version, or enabled change, so cluster deployments stay in sync with the instance. The previous TODO for handling Kubernetes sync on instance update is removed and replaced by this behaviour.

Related Issue

Closes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes)
  • 🧪 Tests (adding or updating tests)
  • 🏗️ Infrastructure/CI changes

Component Affected

  • API (backend)
  • Portal (frontend)
  • Documentation
  • CI/CD
  • Other:

Checklist

General

  • I have read the CONTRIBUTING.md guidelines
  • My code follows the project's code style
  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • My changes generate no new warnings or errors

Testing

  • I have added tests that prove my fix/feature works
  • New and existing unit tests pass locally with my changes
  • I have tested my changes manually

Documentation

  • I have updated the documentation accordingly
  • I have updated the README if needed

Screenshots (if applicable)

N/A

Test Plan

  1. Update an instance via PUT (e.g. change image or version) and confirm the deployment in the cluster is updated (e.g. new image/version in the workload).
  2. Update only enabled and confirm the cluster state matches (e.g. workload scaled or removed as expected).
  3. Perform a PUT with no change to image, version, or enabled and confirm behaviour is unchanged and no unnecessary sync runs if that's how the code is designed.

Additional Notes

Sync runs only when at least one of image, version, or enabled is sent in the request body. If sync fails (e.g. cluster unreachable), the exception propagates and the API may return 5xx; the instance update is already committed in the DB before sync is called.

…kubernetes

Call sync_instance after PUT so cluster deployments reflect new image, version
and enabled; remove TODO and trigger sync when any of these fields change
@github-actions github-actions bot added the api label Feb 15, 2026
@digmunhoz digmunhoz merged commit fdde2a8 into main Feb 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant