Skip to content

Add Workspace Metadata#1807

Open
Mythicaeda wants to merge 21 commits intodevelopfrom
feat/workspace-metadata
Open

Add Workspace Metadata#1807
Mythicaeda wants to merge 21 commits intodevelopfrom
feat/workspace-metadata

Conversation

@Mythicaeda
Copy link
Copy Markdown
Contributor

@Mythicaeda Mythicaeda commented Mar 25, 2026

Description

  • Adds new endpoints for handling metadata files and update existing file endpoints to reject directly updating metadata files
  • Updates the reserved Metadata extension from .aerie to .meta.seqdev
  • Updates listContents endpoint to hide METADATA-type files by default, and to provide the contents of the metadata files if the withMetadata flag is provided
  • Updates file move/copy/delete so that metadata files are consistently handled before their corresponding file. Before, it varied based on endpoint
  • Restricts move/copy/save/delete file endpoints to reject with a 423 Locked status if the file is marked as "readOnly"

Verification

I'd like to add some tests that focus on the contents of the metadata files, and how they're reconstructed after deletion, as well as basic bindings tests for the endpoints.

Documentation

No docs are invalidated, but we should add documenting these new endpoints to writing docs for the other workspace server endpoints

Future work

@Mythicaeda Mythicaeda force-pushed the feat/workspace-metadata branch from 8390b04 to ec20854 Compare March 26, 2026 23:16
@Mythicaeda Mythicaeda force-pushed the feat/workspace-metadata branch from ec20854 to b2a94e4 Compare March 27, 2026 14:09
@Mythicaeda Mythicaeda force-pushed the feat/workspace-metadata branch from b2a94e4 to daced4a Compare March 27, 2026 17:38
@Mythicaeda Mythicaeda force-pushed the feat/workspace-metadata branch from daced4a to 5ac618e Compare March 27, 2026 18:15
@Mythicaeda Mythicaeda force-pushed the feat/workspace-metadata branch from 5ac618e to 99d8a25 Compare March 27, 2026 18:41
@Mythicaeda Mythicaeda force-pushed the feat/workspace-metadata branch from 99d8a25 to b411532 Compare March 27, 2026 20:01
@Mythicaeda
Copy link
Copy Markdown
Contributor Author

Mythicaeda commented Apr 14, 2026

For (1), blocking folder delete if there's a readonly file within the folder would implicitly mean that you cannot delete a workspace if it has a readonly file within it, which feels unintentional. Additionally, even for the normal folder case, the spec feels too vague. There's four approaches I can take to this:

  1. delete up until encountering a readOnly, then stop when one is reached
  2. search the folder (and subfolder) contents for a readOnly before deleting and stop if any are found
  3. delete everything that isn't readOnly -- this one actually aligns with the behavior of rm and would be my preference
  4. One of 1-3, as well as adding a force flag to delete that will skip the readOnly check

For (2), it looks like I forgot to push the change to copy after the demos -- please repull and retest

@dandelany
Copy link
Copy Markdown
Collaborator

Thanks @Mythicaeda - options 2 and 3 above both seem pretty reasonable. I think option 2 (check ahead of time, don't delete anything if readonly is found) is preferable for a couple reasons - despite being different from how the OS does it, it aligns with our principle of having these ops be as atomic as possible & either completely succeed or fail. It also lines up with the Clipper feedback we've gotten re: wanting as many guardrails as possible to stop them from accidentally deleting a folder they didn't mean to delete.

If possible the error message returned in this case should also call out the paths of any read-only files it finds, to help the user track them down if they do intend to delete.

- Update Move and Copy to consistently use java.nio.Files instead of a mix of java.nio.Files and java.io.File
- Update thrown exceptions list for accuracy
- Will no longer include METADATA type files in response
- Made RenderType in charge of the Aerie Metadata type for the backend, as that extension is expected to be fairly constant
- Remove unneeded Optional wrapper from `listFiles` method
- No longer updates `lastEditedBy` when the metadata is updated (unless that field is missing)
- Move user setup to before tests are run
- Move shared User objects to the User helper class
- Move APIResponse Body Parser to RequestBodyHelper
- Allow readonly files to be copied
- Update the metadata on file copy
…d as readonly

- move exceptions into "Exceptions" package
Error Responses were not using the provided Javax serializer on the single item endpoints due to already being converted to JsonObject
Was only running Copy instructions if the user did not have sufficient permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish Tells GH to publish docker images for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metadata for Seqdev Workspaces - Managed fields and Read-only flag Metadata for SeqDev Workspace files - Protocol and API

2 participants