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

Avoid storing KC domain in asset deployment data #4885

Merged
merged 3 commits into from Apr 24, 2024

Conversation

bufke
Copy link
Contributor

@bufke bufke commented Mar 25, 2024

Notes

Remove kobocat domain from kpi asset deployment data. This allows the domain of the kobocat server to change without breaking any linking.

The solution avoids saving the domain on any new data. It also normalizes (strips the domain) existing data.

Alternatives

  • Do nothing, this entire chunk of code will go away some day
  • There is no need to store the url '/api/v1/forms/3' at all. It would be better to use only the existing form ID to construct the full URL. This would lower complexity and disk usage. However it would be a larger change for code that will be removed anyway
  • Write a data migration to delete existing domain data. I felt this is unnecessary as the entire data set will be dropped later.

Depends on

#4874

@noliveleger
Copy link
Contributor

LGTM. Let's merge it as soon as Django 4.2 is ready.

@noliveleger
Copy link
Contributor

There is no need to store the url '/api/v1/forms/3' at all. It would be better to use only the existing form ID to construct the full URL. This would lower complexity and disk usage. However it would be a larger change for code that will be removed anyway

Agreed. Could be part of the mid-term Kobocat as django-app migration.

 # Conflicts:
 #	kpi/deployment_backends/kobocat_backend.py
Base automatically changed from django-4.2 to release/2.024.12 April 24, 2024 16:39
@noliveleger noliveleger marked this pull request as ready for review April 24, 2024 16:40
@noliveleger noliveleger merged commit 88753c9 into release/2.024.12 Apr 24, 2024
5 checks passed
@noliveleger noliveleger deleted the asset-remove-kobocat-domain branch April 24, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants