Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate database attribute allow_run_sync #4961

Merged
merged 4 commits into from
Nov 28, 2018

Conversation

mistercrunch
Copy link
Member

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which Run or Run Async button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

@codecov-io
Copy link

codecov-io commented May 14, 2018

Codecov Report

Merging #4961 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4961      +/-   ##
==========================================
- Coverage   73.36%   73.35%   -0.01%     
==========================================
  Files          67       67              
  Lines        9584     9582       -2     
==========================================
- Hits         7031     7029       -2     
  Misses       2553     2553
Impacted Files Coverage Δ
superset/utils/core.py 88.35% <ø> (-0.03%) ⬇️
superset/views/core.py 74.96% <ø> (ø) ⬆️
superset/models/core.py 84.27% <100%> (-0.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0a5574...f31add1. Read the comment docs.

@john-bodley
Copy link
Member

Thanks for simplifying this logic. One concern is that we shouldn't augment existing migrations but simply create a new migration which drops the deprecated column and sets the async value appropriately.

@mistercrunch
Copy link
Member Author

@john-bodley this was done on purpose as db migrations have been a huge plague and should be avoided whenever possible. A lot of the downtime in the history of Superset has been related to db migrations. Either, db locks/deadlocks at migration time, partial rollout (some in-deployments nodes are missing the new column, deployment reverts requiring a manual downgrade from the previous branch, ...)

The lingering database column in my opinion is no big deal in comparison to the issues related to db migrations problems.

@timifasubaa
Copy link
Contributor

PING

@mistercrunch
Copy link
Member Author

@john-bodley @timifasubaa reviving this, and added the db migration to keep the db clean

@mistercrunch mistercrunch added the risk:db-migration PRs that require a DB migration label Nov 27, 2018
@timifasubaa
Copy link
Contributor

Looks good to me once you get it to pass CI

@mistercrunch mistercrunch force-pushed the deprecate_allow_run_sync branch 2 times, most recently from d1dc070 to bb0d081 Compare November 27, 2018 21:26
There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.
@mistercrunch mistercrunch merged commit 2931baa into apache:master Nov 28, 2018
@mistercrunch mistercrunch deleted the deprecate_allow_run_sync branch November 28, 2018 05:08
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Dec 18, 2018
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Dec 18, 2018
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Dec 19, 2018
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
bipinsoniguavus pushed a commit to ThalesGroup/incubator-superset that referenced this pull request Dec 26, 2018
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Dec 26, 2018
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Dec 28, 2018
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 9, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
xtinec pushed a commit to lyft/incubator-superset that referenced this pull request Jan 9, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 11, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
youngyjd pushed a commit to lyft/incubator-superset that referenced this pull request Jan 11, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
youngyjd pushed a commit to lyft/incubator-superset that referenced this pull request Jan 11, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 12, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 14, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 14, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
youngyjd pushed a commit to lyft/incubator-superset that referenced this pull request Jan 14, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 14, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 17, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
@michellethomas michellethomas added the risk:may-require-downtime Upgrading to this feature may require downtime label Jan 18, 2019
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 24, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Jan 30, 2019
* Deprecate database attribute allow_run_sync

There's really 2 modes of operations in SQL Lab, sync or async
though currently there are 2 boolean flags: allow_run_sync and
allow_run_async, leading to 4 potential combinations, only 2 of which
actually makes sense.

The original vision is that we'd expose the choice to users and they
would decide which `Run` or `Run Async` button to hit.
Later on we decided to have a
single button and for each database to be either sync or async.

This PR cleans up allow_run_sync by removing references to it.

* Fix build

* Add db migration

* using batch_op

(cherry picked from commit 2931baa)
(cherry picked from commit d07786e)
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels risk:db-migration PRs that require a DB migration risk:may-require-downtime Upgrading to this feature may require downtime 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants