Skip to content

Added persist to the DataSession model - #137

Merged
jnation3406 merged 3 commits into
mainfrom
feature/persist_sessions
Sep 29, 2026
Merged

jnation3406 merged 3 commits into
mainfrom
feature/persist_sessions

Conversation

@jnation3406

Copy link
Copy Markdown
Contributor
  • Adds a persist boolean field to the DataSession model defaulting to False.
  • Adds a management command to delete all data sessions with persist=False if they were created > 30 days ago.
  • Adds a cronjob to the k8s stuff to call the management command once a day
  • Adds a new response_fields param to requests for DataSessions which, if specified, limits the returned fields to only those specified. The default without it specified is to return all fields. This is because we have a tremendous amount of data in the operations and input_data fields of DataSessions which we don't want or need returned when just sending a PATCH request to update persist.

…ment command to delete all non-persistant datasessions after 30 days

@sfoale sfoale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good.

@capetillo capetillo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me but I don't have enough expertise to review the yaml file

runAsGroup: 1000
readOnlyRootFilesystem: true
env:
- name: CONTAINER_TYPE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the purpose of this ENV var? Don't see it mentioned anywhere else in this diff, so just making sure it actually exists.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It basically specifies a cache key prefix for the filecache that uses a shared redis instance. It doesn't really matter for this container since it shouldn't be interacting with files anyway, but might as well give it its own value. Its main purpose is so the worker pods and server pods have their own separate caches in the shared redis.

@jnation3406
jnation3406 merged commit 0cfaf82 into main Sep 29, 2026
3 checks 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.

4 participants