-
Notifications
You must be signed in to change notification settings - Fork 8
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
First draft of migration to OTP2 #176
Conversation
@leonardehrenfried fine for me, also for the work on the documentation. For all deployment aspects, I would however ask a feedback to @dulvui |
@leonardehrenfried Great work, looks fine to me! We had a lot of issues with the graph build in the past and currently the graph build works event driven like this:
This approach is quite complex and often breaks, so we would highly prefer your approach. The only thing we noticed is, that this graph files change only every few months, so a daily builds would be too much. Keeping an event driven approach or at least moving the "if the gtfs file changed" check to the github action. @rcavaliere I will deploy the new versions directly to https://journey.opendatahub.testingmachine.eu, since I don't think that we will make changes to the old version. Or do you prefer a third, separate endpoint? |
I think it would not be hard to add a step to Github CI to compare the age of the container image with the age of the STA feed. If STA is newer a graph is built. If the container is newer nothing happens. |
@dulvui yes, no problem on this! Reuse the existing end-point |
@dulvui BTW, how do you determine the creation date of the STA feed? It doesn't have a last-modified header:
And https://gtfs.api.opendatahub.com/v1/dataset/sta-time-tables/ also doesn't contain any kind of date. |
@leonardehrenfried Great then lets add this additional step to the CI and see if it works. I will try to move all the calculation logic and process to the Github Action before the next sprint. Changes in the file get detected by downloading the file, creating the hash of it and then periodically comparing the file with the old hash.
But I saw that it is a quite big and complex bash script, so I might refactor that too. |
I'm still a bit unsure which parts of the repo are my responsibility and which ones are @dulvui's so I'd be happy if you could guide me towards the parts you expect me to take over. Basically, other than documentation, what else should I do during this sprint? |
@leonardehrenfried I think everything that has to do with deployment and graph building would be my part, the rest is yours. |
Yes that sounds good. |
This is my first attempt at moving this repo to OTP2.4. To be precise it is the snapshot version
2.5.0_2024-01-19T14-50
.It introduces a few changes to how things were done previously and I want to get feedback if this is the correct direction or if you want me to stay compatible with how things were done beforehand.
Graph build & deployment
Previously, the graphs were built in the OTP container itself. After having done this for a few years I recommend to new deployments the following:
OSM extraction
Furthermore, rather than using a complicated query to get the correct OSM area, I've switched to the following strategy:
This is probably also faster (but I haven't tested it).
Feedback
I would like to hear if plan is ok or if you have thought about how you would like building and deployment to work.
Further work
If you tell me that my plan is ok, I'm going to improve and clean up the documentation which at the moment is not very up to date.