Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ops-catalog: update bundled template ... and unrelated agent query perf fix #2012

Merged
merged 2 commits into from
Mar 20, 2025

Conversation

psFried
Copy link
Member

@psFried psFried commented Mar 17, 2025

I forgot to update the bundled template in the previous PR, which updated the flow.yaml.

Also includes a quick and dirty improvement to an agent sql query.


This change is Reviewable

@psFried psFried requested a review from jgraettinger March 17, 2025 17:35
@psFried psFried changed the title ops-catalog: update bundled template ops-catalog: update bundled template ... and unrelated agent query perf fix Mar 18, 2025
@psFried psFried force-pushed the phil/ops-catalog-bundle branch from 85fa513 to 39e1a8c Compare March 19, 2025 01:36
Copy link
Member

@jgraettinger jgraettinger left a comment

Choose a reason for hiding this comment

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

LGTM

psFried added 2 commits March 20, 2025 07:12
I forgot to update the bundled template in the previous PR, which updated the flow.yaml.
The `agent_sql::live_specs::fetch_live_specs` function is executed very
frequently in a number of different contexts. We don't always need to resolve
the user and/or spec capabilities, but it turns out that fetching them can take
quite a while. This updates `fetch_live_specs` to use some boolean parameters
to control whether user and spec capabilities are queried. Callsites are all
updated so that we can skip fetching them in the common cases where they're not
needed.

This whole commit is admittedly a bit of a hack. The better solution would be
to use a `Snapshot` to determine capabilities in the agent if necessary. But
this was pretty easy and simple, and so seems worthile to alleviate some strain
on the database.
@psFried psFried force-pushed the phil/ops-catalog-bundle branch from 39e1a8c to a764889 Compare March 20, 2025 11:12
@psFried psFried merged commit 3cd05a2 into master Mar 20, 2025
4 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.

2 participants