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

Bugfix for path concatenation #56

Merged
merged 9 commits into from
Feb 6, 2025
Merged

Conversation

jurraca
Copy link
Contributor

@jurraca jurraca commented Feb 3, 2025

The latest commit on master (using pathlib to do path concatenation in the context) breaks every other path concatenation step in other modules.

I should have done this in one go. Unfortunately, better tests would only have caught some of these issues. The context test is updated here, but we'll need to think about how to test other file handling during the fetching and merge, since file generation and lookup happen outside the context, for example in collectors/routeviews.py. This PR should cover all the instances of path concatenation for files in the app though.

I only caught this by doing a full run, and I'll do that for each change moving forward until we have more tests in place.

@jurraca jurraca mentioned this pull request Feb 4, 2025
kartograf/collectors/parse.py Outdated Show resolved Hide resolved
@fjahr
Copy link
Collaborator

fjahr commented Feb 6, 2025

I only caught this by doing a full run, and I'll do that for each change moving forward until we have more tests in place.

Yeah, we should keep doing it in the foreseeable future. I've been doing it for the bigger change almost every time but didn't repeat it always when you addressed feedback, that's probably how it slipped through. It's annoying but a good motivator to get better test coverage ;)

What do you think about a functional end-to-end test where it's just an reproduction run with some trimmed RPKI, IRR and RV data and we just require it to not crash? We wouldn't even need to keep the trimmed input data in the repository, we could have an external repository which the CI job then clones and runs the repo on.

That should have caught this, right? I guess this wouldn't even be called an functional test, just a CI task, because it wouldn't require any changes on the test suite I think

Co-authored-by: Fabian Jahr <[email protected]>
@jurraca
Copy link
Contributor Author

jurraca commented Feb 6, 2025

a functional end-to-end test where it's just an reproduction run with some trimmed RPKI, IRR and RV data

yea was thinking about this and definitely worth doing. I'll set it up 👍 It would have caught this for sure.

@jurraca
Copy link
Contributor Author

jurraca commented Feb 6, 2025

doing another run for sanity check

@jurraca
Copy link
Contributor Author

jurraca commented Feb 6, 2025

ok successful run based on e85cf4c

@fjahr
Copy link
Collaborator

fjahr commented Feb 6, 2025

tested ACK e85cf4c

@fjahr fjahr merged commit f9eabd2 into asmap:master Feb 6, 2025
2 checks passed
@fjahr
Copy link
Collaborator

fjahr commented Feb 6, 2025

yea was thinking about this and definitely worth doing. I'll set it up 👍 It would have caught this for sure.

Awesome! Should give us some more peace of mind/early feedback.

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.

2 participants