-
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
Deployed feed version summaries #516
Conversation
…ests and restructuring of mongo
@philip-cline I've reverted this back to using the previous approach of getting the deployed feed version with the feed source, so will work with the existing UI functionality. I'm still slightly concerned by how long this might take with 100+ feed sources. Please let me know how it performs! |
…usive between pinned and latest
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.
This is looking good to me. It has sped things up for a large deployment to around 5s, which maybe isn't great but it's a start at least.
src/main/java/com/conveyal/datatools/manager/models/FeedSource.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.
Working great! Just a few possibilities for speed improvements possibly, but I don't have any concrete suggestions so will approve while putting these ideas out there. Let me know what you think!
src/main/java/com/conveyal/datatools/manager/models/FeedSource.java
Outdated
Show resolved
Hide resolved
*/ | ||
@JsonIgnore | ||
@BsonIgnore | ||
private boolean deployedFeedVersionDefined; |
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.
Why do we do this instead of a null check on deployedFeedVersion?
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.
This is to prevent calls to retrieveDeployedFeedVersion()
where there are no deployed feed versions. Using null resulted in the following scenerio: Call to getDeployedFeedVersionId()
returned null, followed by a call to getDeployedFeedVersionStartDate()
returning null and a call to getDeployedFeedVersionEndDate()
also returning null.
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 think this may just be issues with my java understanding how is this field better than those 3 methods returning null? Is it to avoid mongo queries?
src/main/java/com/conveyal/datatools/manager/models/FeedVersionDeployed.java
Show resolved
Hide resolved
Going to merge this to get the correct functionality to prod. Then look to include the project DB call into the two Mongo queries to further improve performance in a new PR. |
Checklist
dev
before they can be merged tomaster
)Description
A new end point has been added to the feed source controller to return the deployed feed version for a given feed source. If the project has a pinned deployment and this deployment has a feed version this is used. If not, the latest feed version for a feed source is used.