Skip to content

Conversation

@tgritter
Copy link
Member

@tgritter tgritter commented Dec 19, 2025

This PR introduces a new FragmentImports message and adds support for organization-level default fragments. Organizations can now define a list of default fragments that will be automatically applied across all machines in the organization.

Changes

  • New message: FragmentImports - defines fragment import configuration with support for:
    • fragment_id - the fragment to import
    • version -required revision or tag to pin to a specific fragment version
    • prefix - optional namespace prefix to avoid resource name collisions
    • variables - optional key-value pairs for fragment variable substitution
  • Updated message: UpdateOrganizationRequest - added repeated FragmentImports fragment_imports field to allow setting organization-level default fragments

Technical Details

  • Default fragments are stored as an array on organization documents
  • Non-existence of the array indicates no default fragments
  • Supports all fragment import features: version pinning, prefixes, and variables

Links

@github-actions github-actions bot added the safe to test committer is a member of this org label Dec 19, 2025
@tgritter tgritter added ready-for-protos add this when you want protos to compile on every commit and removed safe to test committer is a member of this org labels Dec 19, 2025
@github-actions github-actions bot added safe to test committer is a member of this org protos-compiled labels Dec 19, 2025

message FragmentImports {
string fragment_id = 1;
string version = 2; // revision or tag
Copy link
Member Author

Choose a reason for hiding this comment

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

We could make this optional and just default to the latest if it is not present. But probably doesn't hurt to force the client to make it explicit.

@tgritter tgritter changed the title [APP-14658] FragmentImports proto [APP-14658] Fragment Imports Dec 19, 2025
@tgritter tgritter marked this pull request as ready for review December 19, 2025 18:07
@tgritter tgritter added ready-for-protos add this when you want protos to compile on every commit and removed ready-for-protos add this when you want protos to compile on every commit labels Dec 19, 2025
optional string version = 5; // revision or tag
}

message FragmentImports {
Copy link
Member

Choose a reason for hiding this comment

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

Probably a nit, but shouldn't this be FragmentImport singular?

Copy link
Member Author

@tgritter tgritter Dec 19, 2025

Choose a reason for hiding this comment

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

Yep! Nice catch

Copy link
Member

@petrnovikov petrnovikov left a comment

Choose a reason for hiding this comment

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

Left one comment, otherwise LGTM!

@tgritter tgritter added ready-for-protos add this when you want protos to compile on every commit and removed ready-for-protos add this when you want protos to compile on every commit labels Dec 19, 2025
@tgritter tgritter added ready-for-protos add this when you want protos to compile on every commit protos-compiled and removed ready-for-protos add this when you want protos to compile on every commit protos-compiled labels Dec 19, 2025
@tgritter tgritter added ready-for-protos add this when you want protos to compile on every commit and removed protos-compiled ready-for-protos add this when you want protos to compile on every commit labels Dec 22, 2025
@tgritter tgritter force-pushed the APP-14658/fragment-imports branch from 0c9a4f6 to ed5bd16 Compare December 22, 2025 17:37
@tgritter tgritter added ready-for-protos add this when you want protos to compile on every commit and removed ready-for-protos add this when you want protos to compile on every commit labels Dec 22, 2025
@tgritter tgritter force-pushed the APP-14658/fragment-imports branch from 07601ec to ed5bd16 Compare December 22, 2025 18:16
@tgritter tgritter added ready-for-protos add this when you want protos to compile on every commit protos-compiled and removed protos-compiled ready-for-protos add this when you want protos to compile on every commit labels Dec 22, 2025
@tgritter tgritter merged commit a51bbf3 into main Dec 22, 2025
9 of 15 checks passed
@tgritter tgritter deleted the APP-14658/fragment-imports branch December 22, 2025 20:12
jgeaso1266 pushed a commit to jgeaso1266/api that referenced this pull request Dec 25, 2025
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-protos add this when you want protos to compile on every commit safe to test committer is a member of this org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants