Skip to content

Fix kubernetes not resetting sources#1580

Merged
pascalbreuninger merged 1 commit intoloft-sh:mainfrom
bkneis:feature/fix-k8s-reset
Jan 20, 2025
Merged

Fix kubernetes not resetting sources#1580
pascalbreuninger merged 1 commit intoloft-sh:mainfrom
bkneis:feature/fix-k8s-reset

Conversation

@bkneis
Copy link
Copy Markdown
Contributor

@bkneis bkneis commented Jan 20, 2025

Fixes - #1072

This issue was that the devpod agent container setup command that streams the mounts to the PVC only did so if the mount's target was empty. This indicates an initial set up where we need to copy the local files over. In order to not override changes to the files in the devpod, we only did this when the mount was empty in the workspace (initial setup).

But in the event of a reset, we want the sources to be overridden with the local changes, this flow is common for instance to update to .devcontainer.json. Therefore the fix was to check if the reset option was used and if so, stream the mounts, even if not empty, overriding the workspace contents with the local (source).

Copy link
Copy Markdown
Member

@pascalbreuninger pascalbreuninger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pascalbreuninger pascalbreuninger merged commit 34a3a7e into loft-sh:main Jan 20, 2025
@bkneis bkneis deleted the feature/fix-k8s-reset branch January 20, 2025 15:23
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.

2 participants