Skip to content

Closes #19377: Introduce config context profiles #20058

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 4 commits into from
Aug 12, 2025

Conversation

jeremystretch
Copy link
Member

Closes: #19377

  • Introduce the ConfigContextProfile model to hold JSON schema definitions for config contexts
  • Add a profile ForeignKey on ConfigContext
  • Tweak validate_schema() to not raise an error on empty values
  • Tweak ModuleTypeProfile to use validate_schema() as a validator on its schema field
  • Introduce SyncedDataMixin for GraphQL types for models which support data syncing

@jeremystretch jeremystretch force-pushed the 19377-configcontext-schema branch from 63e3736 to 7789147 Compare August 8, 2025 18:15
@jeremystretch jeremystretch marked this pull request as ready for review August 8, 2025 18:34
@jeremystretch jeremystretch requested review from a team and arthanson and removed request for a team August 8, 2025 18:34
Copy link
Collaborator

@arthanson arthanson left a comment

Choose a reason for hiding this comment

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

Not sure if Data Source and Data file should be there - but they don't look like the completely work currently:

  1. you can have both schema and data-source which I think should be one or the other.
  2. adding data-file and saving will cause error
  3. The UI should probably be a dropdown for the type and allow one or the other to be entered - this is different then the current Config Context entry and Config Templates - but those should probably be changed as well? (maybe separate PR)
  4. data source / data file are missing from filters, tables, detail view
  5. The validation I think only works against schema, not against data file.

It also doesn't validate the reverse way, i.e. if you have a profile assigned to a context then change the profile so the validation will fail on the context - Not sure if we want to put up a warning or not?

@jeremystretch
Copy link
Member Author

It also doesn't validate the reverse way, i.e. if you have a profile assigned to a context then change the profile so the validation will fail on the context - Not sure if we want to put up a warning or not?

This is acceptable IMO. The schema was validated against the current profile at the time it was last modified; we can't reasonably ensure anything beyond that.

@arthanson arthanson merged commit b4c8854 into feature Aug 12, 2025
6 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