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

Don't check map quotas during dataset imports #16320

Merged

Conversation

amiedes
Copy link
Contributor

@amiedes amiedes commented Jul 20, 2021

What?

This PR removes the map quota checks from the dataset imports. I believe if the map quota is exhausted but the user still has dataset quota remaining, we should allow data imports.

I've double checked in acceptance that:

  • With remaining dataset quota & exhausted map quota, dataset imports succeed
  • With exhausted map quota, you can't change the visibility of a map
  • With exhausted public_map_quota, you can't import a .carto file containing a public map
  • With exhausted private_map_quota, you can't import a .carto file containing a private map

The reason why I've removed that spec is that even the intention of it is OK: checking the .carto import fails without map quota, the implementation was not right because the test was failing but I checked this in acceptance and was working as expected.

Something worth mentioning is that when you upload a dataset, a default visualization of table type is created. With my change we're allowing to create this kind of visualizations even with the map quota is exhausted, but since this visualizations are created by default and are not visible by the user in the UI, I think it was more important to allow the user uploading datasets rather than forbidding it just because some internal stuff we do collides with this approach.

@shortcut-integration
Copy link

@amiedes amiedes force-pushed the feature/ch166179/reef-admin-can-t-import-datasets-due-to-0 branch from afea881 to 2f6d0b5 Compare July 21, 2021 07:45
@amiedes amiedes marked this pull request as ready for review July 21, 2021 08:24
@manmorjim manmorjim self-requested a review July 21, 2021 08:32
Copy link
Contributor

@manmorjim manmorjim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌

In order to prevent users to upload public/private visualizations which exceed the quota. What about checking map quotas (check_map_quotas) only when the dataset is type of .carto??

@amiedes
Copy link
Contributor Author

amiedes commented Jul 21, 2021

LGTM 👌

In order to prevent users to upload public/private visualizations which exceed the quota. What about checking map quotas (check_map_quotas) only when the dataset is type of .carto??

The thing is that this is already being done, as I tested in the acceptance steps. But it seems like it's done from another place in our code different from the check_map_quotas I removed

@amiedes amiedes merged commit 97131ae into master Jul 21, 2021
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.

None yet

2 participants