Skip to content
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

[ltm-1.6] Import mode for existing data (Leo) #181

Merged
merged 6 commits into from
Jul 31, 2024

Conversation

Kircheneer
Copy link
Contributor

Going off of #178, addressing most of the comments there but making some more drastic changes, like excluding !create from usage with import mode.


The import logic works like this:

1. If the object that we reference doesn't exist, normal design creation logic applies.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This needs to be updated still

@Kircheneer Kircheneer force-pushed the 1.6_import_state_leo branch 2 times, most recently from 64ea031 to 1448892 Compare July 30, 2024 10:50
@Kircheneer Kircheneer marked this pull request as ready for review July 30, 2024 10:50
@Kircheneer Kircheneer force-pushed the 1.6_import_state_leo branch 2 times, most recently from 1157b02 to 2ff28a4 Compare July 30, 2024 10:51
Comment on lines 400 to 405
# When we don't want to assume full control, make sure we don't try to own any of the query filter values.
if not entry_parameters["full_control"]:
for attribute in model_instance.metadata.query_filter_values:
entry_parameters["changes"].pop(attribute, None)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand what is happening here, can the code comment be clarified, please?

Comment on lines 405 to 417
# Check if any owned attributes exist that conflict with the changes for this instance.
for record in change_records_for_instance:
for attribute in record.changes:
if attribute in entry_parameters["changes"]:
raise ValueError( # pylint: disable=raise-missing-from
f"The {attribute} attribute for {instance} is already owned by Design Deployment {record.change_set.deployment}"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also here, I'm not sure what is happening... perhaps a concrete example in code comments?

@Kircheneer Kircheneer force-pushed the 1.6_import_state_leo branch 3 times, most recently from deb5c99 to 3852a6e Compare July 30, 2024 13:05
@abates
Copy link
Contributor

abates commented Jul 31, 2024

LGTM

@Kircheneer Kircheneer force-pushed the 1.6_import_state_leo branch from 3852a6e to 5bd465a Compare July 31, 2024 12:14
@Kircheneer Kircheneer merged commit 65cb7ae into ltm-1.6 Jul 31, 2024
15 checks passed
@abates abates deleted the 1.6_import_state_leo branch October 4, 2024 12:05
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