getredash / redash-toolbelt

API client and utilities to manage a Redash instance
BSD 2-Clause "Simplified" License
140 stars 74 forks source link

The creator of migrated alerts are the account of `redash-migrate` #88

Open yu-iskw opened 3 years ago

yu-iskw commented 3 years ago

Issue

I run redash-migrate alerts with a test environment from the hosted redash, the creator of migrated alerts are the account of redash-migrate, not the original creators. In the case below, I created the test account to migrate whose name is redash-admin.

Alerts

Expected behaviors

The creators have to be the same as those in the original environment.

yu-iskw commented 3 years ago

The issues appears on queries as well. Queries

susodapop commented 3 years ago

Two things are happening here:

Alerts

What you describe is currently the expected behaviour. The code does not try to retain the original alert creator. We can change this. It was not a priority at first because anyone can edit an alert regardless who created it (not the same for queries / dashboards).

Queries

What you describe is not the expected behaviour. Per this line, we create a user client which creates each query. This way the original creator of a query is retained after migration. If this is not happening for you then we need to see reproduction steps as this is a significant issue.

If you can provide reproduction steps, please open a second issue so we can track and prioritise it correctly.