Skip to content

Comments

Fixes while implementing filesystem for ESnet endpoint#39

Merged
gabor-lbl merged 4 commits intodoe-iri:mainfrom
juztas:fsfixes
Feb 20, 2026
Merged

Fixes while implementing filesystem for ESnet endpoint#39
gabor-lbl merged 4 commits intodoe-iri:mainfrom
juztas:fsfixes

Conversation

@juztas
Copy link
Contributor

@juztas juztas commented Feb 18, 2026

  • Deterministic uuid in demo adapter;
  • Allow DEMO_QUEUE_UPDATE_SECS change via env variable;
  • Fix Auth schemantics. Check api_key if Bearer used. extract it (only demo_adapter.py)
  • Fix filesystem api: use skip_heading for tail; define all return models for all filesystem calls; Nested results. use jsonable_encoder to parse it.
  • Break extract in demo_adapter if dir is present.
  • Catch project None;
  • JobStates use enum. Cleaner schema. no custom serializer. (fails schema validation run output != documented contract)
  • Test script to test all Filesystem operations

- Deterministic uuid in demo adapter;
- Allow DEMO_QUEUE_UPDATE_SECS change via env variable;
- Fix Auth schemantics. Check api_key if Bearer used. extract it (only demo_adapter.py)
- Fix filesystem api: use skip_heading for tail; define all return models for all filesystem calls; Nested results. use jsonable_encoder to parse it.
- Break extract in demo_adapter if dir is present.
- Catch project None;
- JobStates use enum. Cleaner schema. no custom serializer. (fails schema validation run output != documented contract)
raise HTTPException(status_code=400, detail="Cannot delete sandbox")
subprocess.run(["rm", "-rf", rp], check=True)
return None
return filesystem_models.RemoveResponse(output=f"Removed {rp}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? If rm fails you already get an error. What additional benefit do we get from returning a static string? Same comment for put files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not required, but I find it useful to have a structured format returned for all Filesystem APIs (It keeps results structured). While it makes sense in synchronous calls to return 204, maybe results could be:

{ "path": "/foo", "deleted": true }

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok I see - yes for async calls we do need something. Thanks!

- upgrade humps to pyhumps 3.8.0 (support not only camelize, but also decamelize)
- Add aliasChoices for target/link{Path}. Match source path
- Update test script to choose storage randomly. Test camelCase, snakeCase
@juztas
Copy link
Contributor Author

juztas commented Feb 20, 2026

Changed everything to snake_case only. @gabor-lbl, ready for your review

@gabor-lbl gabor-lbl merged commit 2233c7b into doe-iri:main Feb 20, 2026
1 check 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.

2 participants