feat: add rss router serving cached resource status#940
Merged
Conversation
aldbr
reviewed
Jun 24, 2026
|
|
||
| async def latest_revision(self) -> tuple[str, datetime]: | ||
| async with self._db as db: | ||
| max_date, count = await db.get_resource_status_date(self.status_types) |
Contributor
There was a problem hiding this comment.
Don't you also need to provide the the element_type to distinguish the elements?
Contributor
There was a problem hiding this comment.
(especially Compute and FTS I assume, which have the same status_types
aldbr
approved these changes
Jun 25, 2026
chrisburr
enabled auto-merge (squash)
June 25, 2026 14:42
Adds the concrete resource status sources (storage, compute, FTS, site)
backed by ResourceStatusDB and serves them through new
/api/rss/{storage,compute,site,fts} endpoints. Responses are read from
an all-VO snapshot cached per source, filtered to the caller's VO, and
carry ETag/Last-Modified headers with 304 support; any authenticated
user may read. Includes the regenerated diracx and gubbins clients.
Closes DIRACGrid#839
Co-authored-by: Loxeris <30194187+Loxeris@users.noreply.github.com>
Compute and FTS sources share the all status type, so latest_revision() computed identical revisions for both and counted rows from the other element type. Pass element_type to get_resource_status_date() so the revision tracks exactly the rows read_raw returns.
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.
Adds the concrete resource status sources (storage, compute, FTS, site)
backed by ResourceStatusDB and serves them through new
/api/rss/{storage,compute,site,fts}endpoints. Responses are read froman all-VO snapshot cached per source, filtered to the caller's VO, and
carry
ETag/Last-Modifiedheaders with 304 support; any authenticateduser may read. Includes the regenerated diracx and gubbins clients.
Replaces #910
Part of #839
Blocked by #936
Blocked by #937
Blocked by #938
Blocked by #939