Don't check map quotas during dataset imports #16320
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
public_map_quota
, you can't import a.carto
file containing a public mapprivate_map_quota
, you can't import a.carto
file containing a private mapThe 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.