-
Notifications
You must be signed in to change notification settings - Fork 6
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
Handle URL rewriting for ZGW import/export #1395
Conversation
5c16d2c
to
513be5c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1395 +/- ##
========================================
Coverage 95.24% 95.25%
========================================
Files 1008 1008
Lines 37364 37463 +99
========================================
+ Hits 35589 35684 +95
- Misses 1775 1779 +4 ☔ View full report in Codecov by Sentry. |
self.service = ServiceFactory(slug="service-0") | ||
ServiceFactory(slug="service-1") | ||
self.service = ServiceFactory( | ||
slug="service-0", api_root="https://foo.0.maykinmedia.nl" |
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.
slug="service-0", api_root="https://foo.0.maykinmedia.nl" | |
slug="service-foo", api_root="https://foo.maykinmedia.nl" |
I find foo
and bar
more readable than foo.0
and foo.1
. Would need to be changed below as well, though.
slug="service-0", api_root="https://foo.0.maykinmedia.nl" | ||
) | ||
self.other_service = ServiceFactory( | ||
slug="service-1", api_root="https://foo.1.maykinmedia.nl" |
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.
slug="service-1", api_root="https://foo.1.maykinmedia.nl" | |
slug="service-bar", api_root="https://bar.maykinmedia.nl" |
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.
A bit pressed for time in this sprint, will fix this if I have a bit of spare time end-of-sprint (but it might be good to review the other changes).
513be5c
to
358c9c7
Compare
Taiga issues.
Essentially, what this does is rewrite all ZGW URLs in the import file to have the same URL root as the service on the target instance (matched on slug).
This is not an especially pretty or general-purpose fix, but it should solve the specific problem for Groningen (who is the only intended user of the feature thus far).