Skip to content

Adding dev_slots to event#9233

Open
royendo wants to merge 4 commits intomainfrom
emit-project-dev-slots
Open

Adding dev_slots to event#9233
royendo wants to merge 4 commits intomainfrom
emit-project-dev-slots

Conversation

@royendo
Copy link
Copy Markdown
Contributor

@royendo royendo commented Apr 14, 2026

follow up to: #9070

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@royendo royendo requested a review from pjain1 April 14, 2026 16:11
Comment thread runtime/registry.go Outdated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@royendo royendo requested a review from pjain1 April 14, 2026 17:09
Copy link
Copy Markdown
Member

@pjain1 pjain1 left a comment

Choose a reason for hiding this comment

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

Do we allow multiple dev deployments? How are we planning emitting to Orb - through the admin billing reporter or directly from runtime instances? If through admin then will require some logic change in the billing metrics API sql for the case of multiple dev deployment as currently it groups by org_id, project_id, event_name and take max(value) which would collapse values for different dev deployments in one row (may be we need to group instance_id as well).

@royendo
Copy link
Copy Markdown
Contributor Author

royendo commented Apr 15, 2026

That is very true and yes we'll have multiple dev deployments; I see Benjamin assigned https://linear.app/rilldata/issue/PLAT-470/report-all-deployments-slot-usage-to-orb to you, do you want to merge this and work on that or should i close this out?

@pjain1
Copy link
Copy Markdown
Member

pjain1 commented Apr 16, 2026

This will be needed anyways, lets keep it open. I will merge it when an approach is finalized.

Comment thread admin/deployments.go Outdated
@royendo
Copy link
Copy Markdown
Contributor Author

royendo commented Apr 17, 2026

admin/deployments.go:

  • Replaced projProdSlots / projDevSlots with a single projSlots + environment on DeploymentAnnotations
  • NewDeploymentAnnotations now uses resolveSlots() to set one slots value and stores the environment
  • ToMap() emits project_slots and environment instead of two mutually exclusive project_prod_slots / project_dev_slots

runtime/registry.go:

  • Single project_slots annotation lookup, emits {env}_slots metric (preserving prod_slots / dev_slots metric names for billing
    compatibility)

Comment thread runtime/registry.go Outdated
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.

3 participants