Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

feat(schematic): added synapse cache purging fds-1445 #2660

Closed andrewelamb closed 1 month ago

andrewelamb commented 2 months ago
andrewelamb commented 2 months ago

@jesusaurus This is the new Schematic API we are hoping to deploy soon, that would replace the old one.

I undertsand that it was suggested by you in this PR, that the synapse cache be moved to "/var/tmp/synapse". Is that still valid?

jesusaurus commented 2 months ago

@andrewelamb yeah, I still have a mild preference for /var/tmp/synapse. It's a standard location for linux services to store a persistent cache, and it preemptively moves the cache to a location that a service user can own, potentially making a transition to running as a service user a little simpler.

andrewelamb commented 1 month ago

Have you tried executing one of the endpoints and see if everything is working as expected? I tried executing: http://localhost:7443/api/v1/ui/#/Storage/get_manifest_csv, and I got an error:

{
  "detail": "local variable 'byte_size' referenced before assignment",
  "status": 500,
  "title": "Internal error"
}

But on schematic side, I tried:

store = SynapseStorage(
        access_token="<my token>", synapse_cache_path="/var/tmp/synapse"
)

and it worked... Do you have similar errors?

I can't replicate this error

linglp commented 1 month ago

Also, I think it worths noting some other changes that were made in the PR:

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed for 'schematic-api'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud