Repository navigation
Task/10323 save and reopen a project in s3 mode - #846
Merged
Merged
Conversation
randy-seng
added this pull request to stack #837
September 28, 2026 07:58
randy-seng
force-pushed
the
task/10323-save-and-reopen-a-project-in-s3-mode
branch
4 times, most recently
from
September 29, 2026 14:44
e6558ce to
47a7ed5
Compare
randy-seng
force-pushed
the
task/10323-save-and-reopen-a-project-in-s3-mode
branch
from
September 29, 2026 15:40
fa41c9d to
4bfd035
Compare
briemla
approved these changes
Sep 30, 2026
Base automatically changed from
task/10322-let-the-project-declare-its-key-prefix
to
main
September 30, 2026 06:47
…3 mode Data is picked per session by time range (OP#10283), so a project's own file references have no reader in s3 mode; recording them would only leave stale paths into the ephemeral user_source staging area behind. The omission lives inside OtConfigParser.convert, keyed off s3_key_prefix, so SaveOtconfig's save and OtconfigHasChanged's comparison agree by construction even if the live repositories drift between the two calls.
A project that names a key prefix arrived through an operator naming it (POST /load_otconfig or --config), not a picker, so saving it always re-saves to its own name and place with no new UI: SavePathSuggester already resolves there. GuardSaveDestination refuses a destination that does not lie under user_source/<prefix>/ before the file is written, and UploadOtconfig puts the saved file back under that prefix afterwards. Both are wired to no-ops outside s3 mode. SaveOtconfig, QuickSaveConfiguration.save, Application.save_otconfig and Application.quick_save_configuration are now async so the upload - S3Upload.upload is async - can be awaited; every caller was already async at the viewmodel layer, so this is plumbing rather than a new concurrency boundary.
The destination guard added alongside the s3 upload refused saving an otconfig outside user_source/<prefix>/. Saving should always succeed locally regardless of destination; only whether it also uploads to s3 depends on the project naming a key prefix. Drops GuardSaveDestination and its s3 implementation.
Info-level logging so an operator can see, from the log alone, where a save landed and whether it also went to s3 - covering the quick-save path too, which never went through the viewmodel's own save logging.
Loading an otconfig with track files over HTTP always failed: OTCloud hands its UI Worker an otconfig through a plain endpoint, whose task carries no NiceGUI slot, and NiceguiProgressbar.open() resolved context.client, which raises on an empty slot stack. A missing page context now counts as having no browser to show the dialog in, like the startup preload already did.
The form outlives the page it is built into, so once that page's browser has left, NiceGUI deletes its client and the form holds a deleted label. clear() resolves the element's client and raised, failing every otconfig loaded after the first visit to the page. set_text() goes through update(), which skips a deleted element. A label has no children, so the clear() did nothing on a live page either.
briemla
force-pushed
the
task/10323-save-and-reopen-a-project-in-s3-mode
branch
from
September 30, 2026 06:47
7e8f611 to
a72f0a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
When a project was opened from a named location in s3 mode, saving it now just works: no save dialog pops up, the file goes straight back to where it came from, and a copy is uploaded to s3 automatically. Saved files for these s3 projects no longer list video/track paths, since those point at temporary local files that don't exist once the project is reopened elsewhere.
Notes for the reviewer
SaveOtconfig(OTAnalytics/application/use_cases/config.py).OTAnalytics/plugin_parser/otconfig_parser.py.Risk and rollout
Nothing changes for projects not using s3. For s3 projects, saved files will no longer include video/track file paths — nothing currently depends on those being there, but it's worth flagging in case something downstream expected them.
OP#10323