-
Notifications
You must be signed in to change notification settings - Fork 53
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
Conversation
…eting FeedVersion.
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.
Looks good to me. One small comment about a comment.
src/test/java/com/conveyal/datatools/manager/models/FeedVersionTest.java
Outdated
Show resolved
Hide resolved
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.
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() { |
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.
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.
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.
Good catch. I suppose the error occurs because the respective namespaces are never created in PostgreSQL, so it fails to delete them.
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.
Added comments and cleanup code in 70a01b7.
…s with fake namespaces.
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.
All good, thanks for the changes.
Checklist
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.