Skip to content

feat: add rss router serving cached resource status#940

Merged
chrisburr merged 2 commits into
DIRACGrid:mainfrom
chrisburr:rss-5-router
Jun 26, 2026
Merged

feat: add rss router serving cached resource status#940
chrisburr merged 2 commits into
DIRACGrid:mainfrom
chrisburr:rss-5-router

Conversation

@chrisburr

@chrisburr chrisburr commented Jun 11, 2026

Copy link
Copy Markdown
Member

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.

Replaces #910
Part of #839

Blocked by #936
Blocked by #937
Blocked by #938
Blocked by #939

@read-the-docs-community

read-the-docs-community Bot commented Jun 11, 2026

Copy link
Copy Markdown

Documentation build overview

📚 diracx | 🛠️ Build #33320126 | 📁 Comparing ae05d00 against latest (0484464)

  🔍 Preview build  

152 files changed · + 1 added · ± 151 modified

+ Added

± Modified

@chrisburr chrisburr linked an issue Jun 11, 2026 that may be closed by this pull request
5 tasks
@chrisburr
chrisburr marked this pull request as ready for review June 23, 2026 20:53
@chrisburr
chrisburr requested a review from Loxeris June 23, 2026 20:53

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)

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.

Don't you also need to provide the the element_type to distinguish the elements?

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.

(especially Compute and FTS I assume, which have the same status_types

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Indeed!

@Loxeris Loxeris left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems good to me other than what @aldbr commented.

@chrisburr
chrisburr enabled auto-merge (squash) June 25, 2026 14:42
chrisburr and others added 2 commits June 26, 2026 09:58
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.
@chrisburr
chrisburr merged commit d214f90 into DIRACGrid:main Jun 26, 2026
29 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.

ResourceStatusSource + route

3 participants