-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix: support for post create updates eg (primary mac address) #68
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mfiedorowicz
approved these changes
Apr 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
31c4896
to
785a98b
Compare
ltucker
added a commit
that referenced
this pull request
Apr 7, 2025
* fix: support for post create updates eg (primary mac address) * use serializers, fix relevent tests * linting * filter fields in the prior state * add some basic smoke tests for diff / diff+apply
ltucker
added a commit
that referenced
this pull request
Apr 7, 2025
* fix: scope support on apply change set (#64) Signed-off-by: Michal Fiedorowicz <[email protected]> * wip diff api * set default values and missing slugs Signed-off-by: Michal Fiedorowicz <[email protected]> * tidy up setting defaults Signed-off-by: Michal Fiedorowicz <[email protected]> * remove unused imports Signed-off-by: Michal Fiedorowicz <[email protected]> * fix constructor of object type Signed-off-by: Michal Fiedorowicz <[email protected]> * set slugs (if not present) after resolving existing instances Signed-off-by: Michal Fiedorowicz <[email protected]> * emit ref_id instead of variable object_id field for new objects * improve entity field mapping coverage * fill in primary value mapping, use primary value for slug * use canonical field ordering in change dicts * first pass at certain common circular refs * remove ref id to itself Signed-off-by: Michal Fiedorowicz <[email protected]> * tidy up Signed-off-by: Michal Fiedorowicz <[email protected]> * add applier Signed-off-by: Michal Fiedorowicz <[email protected]> * fix resolve ref before lookup, use field name directly, not field attr * don't query with unresolved references * fix _build_expressions_queryset Signed-off-by: Michal Fiedorowicz <[email protected]> * resolve lint issues Signed-off-by: Michal Fiedorowicz <[email protected]> * exclude fields with GenericRelation type Signed-off-by: Michal Fiedorowicz <[email protected]> * fix sorting dict we may get ints strings etc Signed-off-by: Michal Fiedorowicz <[email protected]> * rework applier logic Signed-off-by: Michal Fiedorowicz <[email protected]> * applier with content type fields Signed-off-by: Michal Fiedorowicz <[email protected]> * fix content type related existing value Signed-off-by: Michal Fiedorowicz <[email protected]> * exclude foreign key fields with many to one rel Signed-off-by: Michal Fiedorowicz <[email protected]> * fix: support for post create updates eg (primary mac address) (#68) * fix: support for post create updates eg (primary mac address) * use serializers, fix relevent tests * linting * filter fields in the prior state * add some basic smoke tests for diff / diff+apply * Change set validation (#69) * add change set validation Signed-off-by: Michal Fiedorowicz <[email protected]> * remove redundant serializers Signed-off-by: Michal Fiedorowicz <[email protected]> * remove redundant serializers tests Signed-off-by: Michal Fiedorowicz <[email protected]> * tidy up Signed-off-by: Michal Fiedorowicz <[email protected]> * adjust tests, lighter validation of refs on diff, handle generic --------- Signed-off-by: Michal Fiedorowicz <[email protected]> Co-authored-by: Michal Fiedorowicz <[email protected]> * fix: expand support for cycle breaking, add additional logical matchers (#70) * fix: fix error fingerprinting tags (#71) * fix: all noops -> no changes, show noops as only prior state (#72) --------- Signed-off-by: Michal Fiedorowicz <[email protected]> Co-authored-by: Michal Fiedorowicz <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This handles post-create updates like primary mac address on interface.
It also defers merging the updated state with the prior state until display time (makes things slightly simpler for this purpose as well). There is a related change in the assurance plugin.