OldrichDlouhy opened a new issue, #30585:
URL: https://github.com/apache/superset/issues/30585

   ### Bug description
   
   Importing MySQL connection exported on different Superset instance fails on 
validation.
   
   1. On first instance, create MySQL connection
   2. On Advanced tab, edit the Chart Cache Timeout and set it to 3600
   3. Export the connection
   4. On second superset instance, add database and select "Import database 
from file"
   5. Select file exported in step 3
   
   Expected result: Superset asks for user DB password and imports the 
connection
   
   Actual results: Import error is shown in the "Connect a database" dialog
   
   Workaround:
   Extract the connection yaml file from the exported zip file and comment out 
the timeouts. Repack the zip file and import it.
   
   Original MySQL.yaml:
   
   ``` yaml
   database_name: MySQL
   sqlalchemy_uri: 
mysql+mysqldb://username:XXXXXXXXXX@cloud-sql-proxy:3306/eDigi
   cache_timeout: 3600
   expose_in_sqllab: true
   allow_run_async: false
   allow_ctas: false
   allow_cvas: false
   allow_dml: false
   allow_file_upload: false
   extra:
     allows_virtual_table_explore: true
     metadata_cache_timeout:
       schema_cache_timeout: ''
   uuid: 130d3f07-d4bc-4e74-bf35-ca16a61666e0
   version: 1.0.0
   ```
   
   Fixed MySQL.yaml:
   
   ``` yaml
   database_name: MySQL
   sqlalchemy_uri: 
mysql+mysqldb://username:XXXXXXXXXX@cloud-sql-proxy:3306/eDigi
   # cache_timeout: 3600
   expose_in_sqllab: true
   allow_run_async: false
   allow_ctas: false
   allow_cvas: false
   allow_dml: false
   allow_file_upload: false
   extra:
     allows_virtual_table_explore: true
   #  metadata_cache_timeout:
   #    schema_cache_timeout: ''
   uuid: 130d3f07-d4bc-4e74-bf35-ca16a61666e0
   version: 1.0.0
   ```
   
   Possibly related issues:
   * #19222
   * #25987
   * #30383
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.0.2
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to