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

Remove parent publishedVersionId if when deleting FeedVersion #528

Merged
merged 4 commits into from
May 5, 2023

Conversation

binh-dam-ibigroup
Copy link
Contributor

@binh-dam-ibigroup binh-dam-ibigroup commented Apr 7, 2023

Checklist

  • Appropriate branch selected => This PR is against the MTC branch. A similar PR will be made to dev after external acceptance.
  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

Fix #527. See issue for required settings to reproduce that bug.

This PR ensures that feed source publishedVersionId that refer to a feed version being deleted are unset (set to null).

Note: This PR does not address the cause for partially deleted namespaces described in the issue.

Copy link
Contributor

@philip-cline philip-cline left a comment

Choose a reason for hiding this comment

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

Looks good to me. One small comment about a comment.

Copy link
Contributor

@br648 br648 left a comment

Choose a reason for hiding this comment

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

Just the one issue with deleting feed versions. Apart from that it works well.

* {@link FeedSource::publishedVersionId} should be unset if it references a feed version being deleted.
*/
@Test
void shouldDeletePublishedVersionIdWhenDeletingVersion() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this is an OS thing, but the feed versions are not deleted after the test has complete from Mongo:
Could not drop feed for namespace published_namespace - ERROR: schema "published_namespace" does not exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I suppose the error occurs because the respective namespaces are never created in PostgreSQL, so it fails to delete them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comments and cleanup code in 70a01b7.

@br648 br648 assigned binh-dam-ibigroup and unassigned br648 Apr 25, 2023
Copy link
Contributor

@br648 br648 left a comment

Choose a reason for hiding this comment

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

All good, thanks for the changes.

@binh-dam-ibigroup binh-dam-ibigroup merged commit 7d0e61b into mtc-deploy May 5, 2023
@binh-dam-ibigroup binh-dam-ibigroup deleted the mtc-delete-publishedversion branch May 5, 2023 13:42
@binh-dam-ibigroup binh-dam-ibigroup restored the mtc-delete-publishedversion branch May 5, 2023 13:55
@binh-dam-ibigroup binh-dam-ibigroup deleted the mtc-delete-publishedversion branch May 5, 2023 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants