You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2023/06/29 13:09:12 UTC
[GitHub] [superset] michael-s-molina opened a new pull request, #24550: fix: Deque muteted during iteration
michael-s-molina opened a new pull request, #24550:
URL: https://github.com/apache/superset/pull/24550
### SUMMARY
Fix a bug in https://github.com/apache/superset/pull/24488 that happens when running on SQL Lite. There was an event being registered inside another event and causing a `deque mutated during iteration error`. According to SQL Alchemy [docs](https://docs.sqlalchemy.org/en/20/core/event.html#sqlalchemy.event.listen):
> The [listen()](https://docs.sqlalchemy.org/en/20/core/event.html#sqlalchemy.event.listen) function cannot be called at the same time that the target event is being run. This has implications for thread safety, and also means an event cannot be added from inside the listener function for itself. The list of events to be run are present inside of a mutable collection that can’t be changed during iteration.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<img width="1785" alt="Screenshot 2023-06-29 at 09 35 53" src="https://github.com/apache/superset/assets/70410625/94a130fc-9ebd-4587-a34d-e54cd6b8202d">
### TESTING INSTRUCTIONS
Check that the above error does not happen when accessing a dashboard on SQL Lite.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a diff in pull request #24550: fix: Deque mutated during iteration
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #24550:
URL: https://github.com/apache/superset/pull/24550#discussion_r1246672041
##########
tests/unit_tests/databases/ssh_tunnel/dao_tests.py:
##########
@@ -35,7 +35,7 @@ def test_create_ssh_tunnel():
"password": "bar",
}
- result = SSHTunnelDAO.create(properties)
+ result = SSHTunnelDAO.create(properties, commit=False)
Review Comment:
@hughhhh I set `commit=False` to mimic the other tests in the `ssh_tunnel/commands` folder which use `CreateSSHTunnelCommand` that has `commit=False` by default. If we enable the commit in this test or in the command ones, they will fail because there's no database with `id = 1`. If an actual commit is required for the tests, I suggest opening a follow-up PR and fixing not only this test but the ones in the `commands` folder.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #24550: fix: Deque mutated during iteration
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24550:
URL: https://github.com/apache/superset/pull/24550#issuecomment-1613189698
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24550?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#24550](https://app.codecov.io/gh/apache/superset/pull/24550?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (e758524) into [master](https://app.codecov.io/gh/apache/superset/commit/66f59e5797e8d3eb5c7b5d0652b9550595722377?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (66f59e5) will **decrease** coverage by `2.34%`.
> The diff coverage is `100.00%`.
> :exclamation: Current head e758524 differs from pull request most recent head 5df2387. Consider uploading reports for the commit 5df2387 to get more accurate results
```diff
@@ Coverage Diff @@
## master #24550 +/- ##
==========================================
- Coverage 68.98% 66.64% -2.34%
==========================================
Files 1906 1906
Lines 74114 74090 -24
Branches 8155 8155
==========================================
- Hits 51124 49377 -1747
- Misses 20871 22594 +1723
Partials 2119 2119
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `53.92% <20.00%> (?)` | |
| postgres | `?` | |
| presto | `53.82% <20.00%> (ø)` | |
| python | `78.41% <100.00%> (-4.86%)` | :arrow_down: |
| sqlite | `78.04% <100.00%> (ø)` | |
| unit | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://app.codecov.io/gh/apache/superset/pull/24550?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [superset/utils/core.py](https://app.codecov.io/gh/apache/superset/pull/24550?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `88.45% <100.00%> (-3.03%)` | :arrow_down: |
... and [132 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24550/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina merged pull request #24550: fix: Deque mutated during iteration
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina merged PR #24550:
URL: https://github.com/apache/superset/pull/24550
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org