[SIP] Proposal for naming the assets in export
Motivation
Currently when I export a dashboard and related assets like charts, the dashboard and chart files names seem to have a random number as the suffix of the filename. This number can change even if the actual chart or dashboard is the same. This constant changing of the asset file names creates a problem when storing the assets in a version control system like Git.
Proposed Change
Name the exported assets in the following manner:
New or Changed Public Interfaces
New dependencies
Migration Plan and Compatibility
Rejected Alternatives
Comment From: mistercrunch
Not sure if this qualifies as a SIP (SIP are used where consensus can't be implicit, or where there's a significant change that could be controversial), but tagging @betodealmeida who might know more about the id in the filename. I noticed there's a PR related to this, is it coming from the same place? https://github.com/apache/superset/pull/33852
Comment From: rusackas
CC @abhinav-1305 regarding the linked PR
Comment From: betodealmeida
Currently when I export a dashboard and related assets like charts, the dashboard and chart files names seem to have a random number as the suffix of the filename.
This is because dashboard and chart names are not unique, so we add the ID as a suffix to prevent collisions.
Comment From: betodealmeida
We could add the UUID in place of the ID, but that would make the filenames much bigger. But at least they would be stable.
Comment From: mistercrunch
short-uuid, I think 8+ characters is plenty in general (GitHub often represents and supports partial uuid). Odds of collision by number of characters:
8 digits would be plenty for all use cases, here it's just where there's already a name collision, but might as well make it collision free and standardize on 8 or 10. Hoping we can go to uuid-first at some point across all the internals and APIs, and should support short uuids there too.
Comment From: mistercrunch
Noticed a little while back that all these links work and land on the same page: - full uuid (ui truncates visually with 7 chars): https://github.com/apache/superset/commit/6876a1e6843cd1f28f4206ca2dd75342dfddcf26 - same uuid, 8 chars: https://github.com/apache/superset/commit/6876a1e6 - same uuid, 6 chars: https://github.com/apache/superset/commit/6876a1
Comment From: rusackas
Seems this is more than ready for a DISCUSS thread on the dev@ mailing list. @pksilen let me know here or on Slack if you want help with that process. Thanks!