Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add prebuild invalidation via last_invalidated_at timestamp#20582

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
mtojek wants to merge31 commits intomain
base:main
Choose a base branch
Loading
from17917-prebuilds-invalidation

Conversation

@mtojek
Copy link
Member

@mtojekmtojek commentedOct 30, 2025
edited
Loading

Implements prebuild invalidation by settinglast_invalidated_at timestamp on presets.

The reconciler automatically marks prebuilds as expired ifprebuild.created_at < preset.last_invalidated_at and spawns fresh ones.

API:POST /templates/{template}/prebuilds/invalidate

Response:

{"invalidated_presets": ["preset-1","preset-2","preset-3"]}

Updates#17917

Implements new approach for prebuild invalidation as discussed in issue#17917.Instead of directly deleting workspaces, this sets a timestamp on presets,and the reconciler automatically marks prebuilds as expired and creates new ones.Implementation:- Add last_invalidated_at column to template_version_presets table- API endpoint: POST /templates/{template}/prebuilds/invalidate- Updates last_invalidated_at = NOW() for all active template version presets- filterExpiredWorkspaces checks if prebuild.created_at < preset.last_invalidated_at- Reconciler automatically deletes expired prebuilds and spawns fresh onesChanges:- Migration 000394: Add last_invalidated_at column- Query: UpdatePresetsLastInvalidatedAt sets timestamp on active presets- API: Returns count and list of invalidated preset names- Logic: filterExpiredWorkspaces prioritizes last_invalidated_at over TTL- SDK: InvalidateTemplatePrebuilds client method with structured responseBenefits:- Non-blocking: API doesn't wait for reconciler- Async: Reconciler handles actual deletion- Safe: template_version_presets is no longer write-onceUpdates#17917
- Use uuid.NullUUID{UUID: template.ID, Valid: true}- Use sql.NullTime{Time: dbtime.Now(), Valid: true}
@mtojekmtojekforce-pushed the17917-prebuilds-invalidation branch from96249b9 to90b75e1CompareOctober 30, 2025 12:55
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@mtojekmtojek

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp