Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pro): always check for available template updates and wait for changed parameters to be applied #1567

Merged

Conversation

pascalbreuninger
Copy link
Member

Changes the template behaviour for pro instances like so:

  1. If template is not versioned always keep the workspace in sync
    with template, even if that means rescheduling due to workspace
    changes
  2. If the template is versioned and the workspace uses an explicit
    version we keep the workspace up to date with the template unless a
    new version is available. We expect versioned templates to introduce
    changes through a new version, not by updating an existing version

In addition to that we now wait until the server applied parameter
changes instead of assuming it did in time. This fixes a race condition
where the parameter changes wouldn't be applied if the controller took
more than a couple ms

@pascalbreuninger pascalbreuninger requested a review from a team January 16, 2025 08:57
Copy link
Contributor

@bkneis bkneis left a comment

Choose a reason for hiding this comment

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

LGTM! Nice job on the quick fix

changed parameters to be applied

Changes the template behaviour for pro instances like so:
1. If template is not versioned _always_ keep the workspace in sync
   with template, even if that means rescheduling due to workspace
   changes
2. If the template is versioned and the workspace uses an explicit
   version we keep the workspace up to date with the template unless a
   new version is available. We expect versioned templates to introduce
   changes through a new version, not by updating an existing version

In addition to that we now wait until the server applied parameter
changes instead of assuming it did in time. This fixes a race condition
where the parameter changes wouldn't be applied if the controller took
more than a couple ms
@pascalbreuninger pascalbreuninger force-pushed the fix/apply-template-updates branch from bc7357e to 82901b4 Compare January 16, 2025 11:27
@pascalbreuninger pascalbreuninger merged commit 7c277f1 into loft-sh:main Jan 16, 2025
17 of 23 checks passed
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.

3 participants