Skip to content

add a mz_license_keys catalog table #33121

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

Merged
merged 2 commits into from
Jul 28, 2025
Merged

add a mz_license_keys catalog table #33121

merged 2 commits into from
Jul 28, 2025

Conversation

doy-materialize
Copy link
Contributor

Motivation

we'll want to be able to have a page in the self-managed console which displays license key metadata so that users can see when their key is going to expire

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@doy-materialize doy-materialize requested a review from a team as a code owner July 23, 2025 16:18
@doy-materialize doy-materialize requested a review from aljoscha July 23, 2025 16:18
Copy link
Contributor

@jubrad jubrad left a comment

Choose a reason for hiding this comment

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

probably needs a bunch of test rewrites and maybe docs changes.

Comment on lines +566 to +575
if !catalog.state.license_key.id.is_empty() {
builtin_table_updates.push(
catalog.state.resolve_builtin_table_update(
catalog
.state
.pack_license_key_update(&catalog.state.license_key)?,
),
);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm.. does this get cleared on restart? Just trying to think the the license key update story.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll verify this tomorrow, but i'm pretty confident that this gets reset on every restart (it's the same codepath that the egress ip table uses)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, this updates on restart.

@doy-materialize doy-materialize force-pushed the push-urnrryqkvwwt branch 3 times, most recently from f7e1288 to d44d55b Compare July 23, 2025 22:52
@doy-materialize doy-materialize requested a review from a team as a code owner July 23, 2025 22:52
Copy link
Contributor

@kay-kim kay-kim left a comment

Choose a reason for hiding this comment

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

Am good with the docs changes.

| Field | Type | Meaning |
| ----------- | ----------- | -------- |
| `id` | [`text`] | The identifier of this particular license key. |
| `organization` | [`text`] | The name of the organization that this license key was issued to. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for my edification ... does this organization map to something like the company name associated with the account setting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it's just an arbitrary string identifying the organization that this license key was issued to. for now, it's just the frontegg tenant id for the customer, but it could be anything (i think for community edition license keys, it will probably be the user's email address, for instance)

| ----------- | ----------- | -------- |
| `id` | [`text`] | The identifier of this particular license key. |
| `organization` | [`text`] | The name of the organization that this license key was issued to. |
| `environment_id` | [`text`] | The environment ID that this license key was issued for. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, just for my edification ... what does the environment_id map to? (heh heh ... I'm sure it's in some design doc somewhere)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

environment_id is the use case id which corresponds to the --environment-id flag passed to environmentd

@doy-materialize doy-materialize force-pushed the push-urnrryqkvwwt branch 3 times, most recently from 8e8e65f to 8e653f4 Compare July 24, 2025 23:14
@doy-materialize doy-materialize merged commit fe501ff into main Jul 28, 2025
126 checks passed
@doy-materialize doy-materialize deleted the push-urnrryqkvwwt branch July 28, 2025 15:27
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