fix(assets import): Ensure old datasource ids are not referenced in imported charts#25086
Conversation
|
@jfrag1 Is is possible to refactor and extract said logic to a utility function or something else to avoid the copy/paste? |
Yes it is of course possible, but due to the amount of duplication present, I think the refactor required to eliminate this duplication warrants its own PR and review process. Just check the cc @betodealmeida as I just noticed there's a relevant todo comment he left |
SUMMARY
#23582 fixed this exact same issue, but only for the dashboard import command. I didn't realize at the time this also needed to be fixed for the assets import command (used by
/api/v1/assets/import). It turns out there's a good amount of duplicated code between the different import commands, so the same fix has to be copied here as well.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION