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

BE: NMS-16536, Provisioning fails when category has been deleted #7463

Merged
merged 11 commits into from
Dec 9, 2024

Conversation

smunir-onms
Copy link
Contributor

Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

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

Were you able to reproduce this issue on foundation-2023 without any changes to the code ?

@smunir-onms
Copy link
Contributor Author

Screencast from 10-17-2024 01:42:44 AM.webm
Unit test validation screen-recording attached

@smunir-onms smunir-onms requested a review from cgorantla October 17, 2024 13:55
Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

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

Check if you can add a test case for this in ProvisionerIT using actual Daos instead of mocks.

Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

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

Please resolve file permissions 100644 → 100755.

and try to add a test case to validate the scenario with actual Daos

christianpape
christianpape previously approved these changes Oct 22, 2024
Copy link
Contributor

@christianpape christianpape left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor Author

@smunir-onms smunir-onms Oct 25, 2024

Choose a reason for hiding this comment

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

The last three asserts should also be passed for a complete scenario, there are some IT DAO limitations;

When m_provisionService.updateNodeAttributes(n); is called from the test class

image

the last category with ID 3 was deleted
Screenshot from 2024-10-25 21-56-10
the related association was also deleted
Screenshot from 2024-10-25 22-00-36

new category created with the same name with new ID 4
Screenshot from 2024-10-25 22-05-57

new association, with the same node and new category, going to be created
Screenshot from 2024-10-25 22-06-51

after this action, the category was updated with the previous ID 3 in the association
Screenshot from 2024-10-25 22-03-07

the category dao was also updated with a duplicate category with old ID 3
Screenshot from 2024-10-25 22-02-09

Due to this behavior, the last three asserts failed.

@cgorantla
Copy link
Contributor

@smunir-onms can you merge latest foundation-2023 in this branch

@smunir-onms
Copy link
Contributor Author

@smunir-onms can you merge latest foundation-2023 in this branch

Done.

@smunir-onms smunir-onms requested a review from cgorantla December 6, 2024 13:05
Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks for the fixes.

@smunir-onms smunir-onms merged commit 8cf0fd1 into foundation-2023 Dec 9, 2024
22 checks passed
@smunir-onms smunir-onms deleted the smq/jira/NMS-16536 branch December 9, 2024 11:29
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