You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/09 06:25:59 UTC

[GitHub] [incubator-superset] etr2460 opened a new pull request #10815: chore: type src/logger

etr2460 opened a new pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815


   ### SUMMARY
   This should be an easy one. Migrates files in `src/logger` to TypeScript.
   
   ### TEST PLAN
   CI
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   to: @graceguo-supercat @ktmud 


----------------------------------------------------------------
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.

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] [incubator-superset] etr2460 merged pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
etr2460 merged pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815


   


----------------------------------------------------------------
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.

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] [incubator-superset] codecov-io edited a comment on pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#issuecomment-733461237


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=h1) Report
   > Merging [#10815](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=desc) (2f01340) into [master](https://codecov.io/gh/apache/incubator-superset/commit/872a54d304f637e695e677233d7267aa56605d75?el=desc) (872a54d) will **decrease** coverage by `3.91%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10815/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10815      +/-   ##
   ==========================================
   - Coverage   67.29%   63.38%   -3.92%     
   ==========================================
     Files         905      448     -457     
     Lines       43862    27567   -16295     
     Branches     4201        0    -4201     
   ==========================================
   - Hits        29519    17474   -12045     
   + Misses      14239    10093    -4146     
   + Partials      104        0     -104     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.38% <ø> (-0.26%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `73.65% <0.00%> (-8.64%)` | :arrow_down: |
   | [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.77% <0.00%> (-1.09%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `90.36% <0.00%> (-0.87%)` | :arrow_down: |
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `73.74% <0.00%> (-0.46%)` | :arrow_down: |
   | ... and [456 more](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=footer). Last update [872a54d...2f01340](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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] [incubator-superset] codecov-io commented on pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#issuecomment-733461237


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=h1) Report
   > Merging [#10815](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=desc) (2f01340) into [master](https://codecov.io/gh/apache/incubator-superset/commit/872a54d304f637e695e677233d7267aa56605d75?el=desc) (872a54d) will **decrease** coverage by `4.36%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10815/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10815      +/-   ##
   ==========================================
   - Coverage   67.29%   62.93%   -4.37%     
   ==========================================
     Files         905      448     -457     
     Lines       43862    27565   -16297     
     Branches     4201        0    -4201     
   ==========================================
   - Hits        29519    17348   -12171     
   + Misses      14239    10217    -4022     
   + Partials      104        0     -104     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `62.93% <ø> (-0.72%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.08% <0.00%> (-29.97%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-12.53%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
   | [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
   | ... and [460 more](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=footer). Last update [872a54d...2f01340](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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] [incubator-superset] ktmud commented on a change in pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#discussion_r485803045



##########
File path: superset-frontend/src/logger/actions/index.ts
##########
@@ -16,10 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { Dispatch } from 'react-redux';
+
 export const LOG_EVENT = 'LOG_EVENT';
 
-export function logEvent(eventName, eventData) {
-  return dispatch =>
+export function logEvent(eventName: string, eventData: Record<string, any>) {

Review comment:
       E.g.
   
   ```diff
   diff --git a/superset-frontend/src/logger/actions/index.js b/superset-frontend/src/logger/actions.ts
   similarity index 79%
   rename from superset-frontend/src/logger/actions/index.js
   rename to superset-frontend/src/logger/actions.ts
   index f319068e6..884a8982f 100644
   --- a/superset-frontend/src/logger/actions/index.js
   +++ b/superset-frontend/src/logger/actions.ts
   @@ -16,10 +16,16 @@
     * specific language governing permissions and limitations
     * under the License.
     */
   +import { Dispatch } from 'react-redux';
   +import { LogEventName, LogEventPayload } from './constants';
   +
    export const LOG_EVENT = 'LOG_EVENT';
    
   -export function logEvent(eventName, eventData) {
   -  return dispatch =>
   +export function logEvent<T extends LogEventName>(
   +  eventName: T,
   +  eventData: LogEventPayload<T>,
   +) {
   +  return (dispatch: Dispatch<never>) =>
        dispatch({
          type: LOG_EVENT,
          payload: {
   diff --git a/superset-frontend/src/logger/constants.ts b/superset-frontend/src/logger/constants.ts
   new file mode 100644
   index 000000000..7180e1a21
   --- /dev/null
   +++ b/superset-frontend/src/logger/constants.ts
   @@ -0,0 +1,39 @@
   +/**
   + * Licensed to the Apache Software Foundation (ASF) under one
   + * or more contributor license agreements.  See the NOTICE file
   + * distributed with this work for additional information
   + * regarding copyright ownership.  The ASF licenses this file
   + * to you under the Apache License, Version 2.0 (the
   + * "License"); you may not use this file except in compliance
   + * with the License.  You may obtain a copy of the License at
   + *
   + *   http://www.apache.org/licenses/LICENSE-2.0
   + *
   + * Unless required by applicable law or agreed to in writing,
   + * software distributed under the License is distributed on an
   + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   + * KIND, either express or implied.  See the License for the
   + * specific language governing permissions and limitations
   + * under the License.
   + */
   +export const LogEvents = {
   +  load_chart: 'load_chart',
   +  render_chart: 'render_chart',
   +  hide_browser_tab: 'hide_browser_tab',
   +  mount_dashboard: 'mount_dashboard',
   +  mount_explorer: 'mount_explorer',
   +  select_dashboard_tab: 'select_dashboard_tab',
   +  force_refresh_chart: 'force_refresh_chart',
   +  change_explore_controls: 'change_explore_controls',
   +  toggle_edit_dashboard: 'toggle_edit_dashboard',
   +  force_refresh_dashboard: 'force_refresh_dashboard',
   +  periodic_render_dashboard: 'periodic_render_dashboard',
   +  explore_dashboard_chart: 'explore_dashboard_chart',
   +  export_csv_dashboard_chart: 'export_csv_dashboard_chart',
   +  change_dashboard_filter: 'change_dashboard_filter',
   +  omnibar_triggered: 'omnibar_triggered',
   +};
   +
   +export type LogEventName = keyof typeof LogEvents;
   +
   +export type LogEventPayload<T> = Record<string, any>;
   diff --git a/superset-frontend/src/logger/index.ts b/superset-frontend/src/logger/index.ts
   new file mode 100644
   index 000000000..d3bd62022
   --- /dev/null
   +++ b/superset-frontend/src/logger/index.ts
   @@ -0,0 +1,20 @@
   +/**
   + * Licensed to the Apache Software Foundation (ASF) under one
   + * or more contributor license agreements.  See the NOTICE file
   + * distributed with this work for additional information
   + * regarding copyright ownership.  The ASF licenses this file
   + * to you under the Apache License, Version 2.0 (the
   + * "License"); you may not use this file except in compliance
   + * with the License.  You may obtain a copy of the License at
   + *
   + *   http://www.apache.org/licenses/LICENSE-2.0
   + *
   + * Unless required by applicable law or agreed to in writing,
   + * software distributed under the License is distributed on an
   + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   + * KIND, either express or implied.  See the License for the
   + * specific language governing permissions and limitations
   + * under the License.
   + */
   +export * from './constants';
   +export * from './actions';
   
   ```




----------------------------------------------------------------
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.

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] [incubator-superset] codecov-io edited a comment on pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#issuecomment-733461237


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=h1) Report
   > Merging [#10815](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=desc) (ab03b53) into [master](https://codecov.io/gh/apache/incubator-superset/commit/e4d02881d244999a382499cd4ebad53ea8744047?el=desc) (e4d0288) will **decrease** coverage by `0.40%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10815/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10815      +/-   ##
   ==========================================
   - Coverage   63.38%   62.98%   -0.41%     
   ==========================================
     Files         905      448     -457     
     Lines       43922    27556   -16366     
     Branches     4221        0    -4221     
   ==========================================
   - Hits        27841    17356   -10485     
   + Misses      15902    10200    -5702     
   + Partials      179        0     -179     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `?` | |
   | python | `62.98% <ø> (-0.66%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.08% <0.00%> (-29.97%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-12.53%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
   | [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `97.56% <0.00%> (-2.44%)` | :arrow_down: |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
   | ... and [463 more](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=footer). Last update [e4d0288...ab03b53](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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] [incubator-superset] codecov-io edited a comment on pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#issuecomment-733461237


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=h1) Report
   > Merging [#10815](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=desc) (ab03b53) into [master](https://codecov.io/gh/apache/incubator-superset/commit/e4d02881d244999a382499cd4ebad53ea8744047?el=desc) (e4d0288) will **increase** coverage by `0.08%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10815/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10815      +/-   ##
   ==========================================
   + Coverage   63.38%   63.47%   +0.08%     
   ==========================================
     Files         905      448     -457     
     Lines       43922    27567   -16355     
     Branches     4221        0    -4221     
   ==========================================
   - Hits        27841    17497   -10344     
   + Misses      15902    10070    -5832     
   + Partials      179        0     -179     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `?` | |
   | python | `63.47% <ø> (-0.18%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `73.65% <0.00%> (-8.64%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `96.51% <0.00%> (-2.33%)` | :arrow_down: |
   | [superset/views/base\_api.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.61% <0.00%> (-0.48%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <0.00%> (-0.28%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `90.62% <0.00%> (-0.14%)` | :arrow_down: |
   | [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | | |
   | [superset-frontend/src/components/ListView/utils.ts](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvdXRpbHMudHM=) | | |
   | [...d/src/dashboard/components/gridComponents/Tabs.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL1RhYnMuanN4) | | |
   | [...rset-frontend/src/components/NavDropdown/index.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTmF2RHJvcGRvd24vaW5kZXgudHN4) | | |
   | ... and [451 more](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=footer). Last update [e4d0288...ab03b53](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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] [incubator-superset] ktmud commented on a change in pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#discussion_r485787999



##########
File path: superset-frontend/src/logger/actions/index.ts
##########
@@ -16,10 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { Dispatch } from 'react-redux';
+
 export const LOG_EVENT = 'LOG_EVENT';
 
-export function logEvent(eventName, eventData) {
-  return dispatch =>
+export function logEvent(eventName: string, eventData: Record<string, any>) {

Review comment:
       Would be nice to limit `eventName` and corresponding `eventData` to make this typing more useful. 
   




----------------------------------------------------------------
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.

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] [incubator-superset] codecov-io edited a comment on pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#issuecomment-733461237






----------------------------------------------------------------
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.

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] [incubator-superset] ktmud commented on a change in pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#discussion_r485803045



##########
File path: superset-frontend/src/logger/actions/index.ts
##########
@@ -16,10 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { Dispatch } from 'react-redux';
+
 export const LOG_EVENT = 'LOG_EVENT';
 
-export function logEvent(eventName, eventData) {
-  return dispatch =>
+export function logEvent(eventName: string, eventData: Record<string, any>) {

Review comment:
       E.g.
   
   ```diff
   diff --git a/superset-frontend/src/chart/Chart.jsx b/superset-frontend/src/chart/Chart.jsx
   index 118cfe18f..c1a1f8f25 100644
   --- a/superset-frontend/src/chart/Chart.jsx
   +++ b/superset-frontend/src/chart/Chart.jsx
   @@ -20,9 +20,9 @@ import PropTypes from 'prop-types';
    import React from 'react';
    import { Alert } from 'react-bootstrap';
    import { styled, logging } from '@superset-ui/core';
   +import { getTimeSincePageLoad, LOG_EVENTS } from 'src/logger';
    
    import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
   -import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';
    import Loading from '../components/Loading';
    import RefreshChartOverlay from '../components/RefreshChartOverlay';
    import ErrorMessageWithStackTrace from '../components/ErrorMessage/ErrorMessageWithStackTrace';
   @@ -138,13 +138,13 @@ class Chart extends React.PureComponent {
          info ? info.componentStack : null,
        );
    
   -    actions.logEvent(LOG_ACTIONS_RENDER_CHART, {
   +    actions.logEvent(LOG_EVENTS.load_chart, {
          slice_id: chartId,
          has_err: true,
          error_details: error.toString(),
          start_offset: this.renderStartTime,
          ts: new Date().getTime(),
   -      duration: Logger.getTimestamp() - this.renderStartTime,
   +      duration: getTimeSincePageLoad() - this.renderStartTime,
        });
      }
    
   diff --git a/superset-frontend/src/chart/ChartContainer.jsx b/superset-frontend/src/chart/ChartContainer.jsx
   index f509281f3..28f41a645 100644
   --- a/superset-frontend/src/chart/ChartContainer.jsx
   +++ b/superset-frontend/src/chart/ChartContainer.jsx
   @@ -18,9 +18,9 @@
     */
    import { connect } from 'react-redux';
    import { bindActionCreators } from 'redux';
   +import { logEvent } from 'src/logger';
    
    import * as actions from './chartAction';
   -import { logEvent } from '../logger/actions';
    import Chart from './Chart';
    
    function mapDispatchToProps(dispatch) {
   diff --git a/superset-frontend/src/chart/chartAction.js b/superset-frontend/src/chart/chartAction.js
   index fb19186cb..909dd19d7 100644
   --- a/superset-frontend/src/chart/chartAction.js
   +++ b/superset-frontend/src/chart/chartAction.js
   @@ -20,6 +20,7 @@
    /* eslint no-param-reassign: ["error", { "props": false }] */
    import moment from 'moment';
    import { t, SupersetClient } from '@superset-ui/core';
   +import { logEvent } from 'src/logger';
    import { isFeatureEnabled, FeatureFlag } from '../featureFlags';
    import {
      getAnnotationJsonUrl,
   @@ -36,7 +37,6 @@ import {
    } from '../modules/AnnotationTypes';
    
    import { addDangerToast } from '../messageToasts/actions';
   -import { logEvent } from '../logger/actions';
    import { Logger, LOG_ACTIONS_LOAD_CHART } from '../logger/LogUtils';
    import getClientErrorObject from '../utils/getClientErrorObject';
    import { allowCrossDomain as domainShardingEnabled } from '../utils/hostNamesConfig';
   @@ -357,7 +357,7 @@ export function exploreJSON(
            // For now just use the first result.
            const result = response.result[0];
            dispatch(
   -          logEvent(LOG_ACTIONS_LOAD_CHART, {
   +          logEvent('load_chart', {
                slice_id: key,
                is_cached: result.is_cached,
                force_refresh: force,
   @@ -379,7 +379,7 @@ export function exploreJSON(
          .catch(response => {
            const appendErrorLog = (errorDetails, isCached) => {
              dispatch(
   -            logEvent(LOG_ACTIONS_LOAD_CHART, {
   +            logEvent('load_chart', {
                  slice_id: key,
                  has_err: true,
                  is_cached: isCached,
   diff --git a/superset-frontend/src/logger/LogUtils.js b/superset-frontend/src/logger/LogUtils.js
   deleted file mode 100644
   index 17e4a0f69..000000000
   --- a/superset-frontend/src/logger/LogUtils.js
   +++ /dev/null
   @@ -1,66 +0,0 @@
   -/**
   - * Licensed to the Apache Software Foundation (ASF) under one
   - * or more contributor license agreements.  See the NOTICE file
   - * distributed with this work for additional information
   - * regarding copyright ownership.  The ASF licenses this file
   - * to you under the Apache License, Version 2.0 (the
   - * "License"); you may not use this file except in compliance
   - * with the License.  You may obtain a copy of the License at
   - *
   - *   http://www.apache.org/licenses/LICENSE-2.0
   - *
   - * Unless required by applicable law or agreed to in writing,
   - * software distributed under the License is distributed on an
   - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   - * KIND, either express or implied.  See the License for the
   - * specific language governing permissions and limitations
   - * under the License.
   - */
   -// Log event names ------------------------------------------------------------
   -export const LOG_ACTIONS_LOAD_CHART = 'load_chart';
   -export const LOG_ACTIONS_RENDER_CHART = 'render_chart';
   -export const LOG_ACTIONS_HIDE_BROWSER_TAB = 'hide_browser_tab';
   -
   -export const LOG_ACTIONS_MOUNT_DASHBOARD = 'mount_dashboard';
   -export const LOG_ACTIONS_MOUNT_EXPLORER = 'mount_explorer';
   -
   -export const LOG_ACTIONS_SELECT_DASHBOARD_TAB = 'select_dashboard_tab';
   -export const LOG_ACTIONS_FORCE_REFRESH_CHART = 'force_refresh_chart';
   -export const LOG_ACTIONS_CHANGE_EXPLORE_CONTROLS = 'change_explore_controls';
   -export const LOG_ACTIONS_TOGGLE_EDIT_DASHBOARD = 'toggle_edit_dashboard';
   -export const LOG_ACTIONS_FORCE_REFRESH_DASHBOARD = 'force_refresh_dashboard';
   -export const LOG_ACTIONS_PERIODIC_RENDER_DASHBOARD =
   -  'periodic_render_dashboard';
   -export const LOG_ACTIONS_EXPLORE_DASHBOARD_CHART = 'explore_dashboard_chart';
   -export const LOG_ACTIONS_EXPORT_CSV_DASHBOARD_CHART =
   -  'export_csv_dashboard_chart';
   -export const LOG_ACTIONS_CHANGE_DASHBOARD_FILTER = 'change_dashboard_filter';
   -export const LOG_ACTIONS_OMNIBAR_TRIGGERED = 'omnibar_triggered';
   -
   -// Log event types --------------------------------------------------------------
   -export const LOG_EVENT_TYPE_TIMING = new Set([
   -  LOG_ACTIONS_LOAD_CHART,
   -  LOG_ACTIONS_RENDER_CHART,
   -  LOG_ACTIONS_HIDE_BROWSER_TAB,
   -]);
   -export const LOG_EVENT_TYPE_USER = new Set([
   -  LOG_ACTIONS_MOUNT_DASHBOARD,
   -  LOG_ACTIONS_SELECT_DASHBOARD_TAB,
   -  LOG_ACTIONS_EXPLORE_DASHBOARD_CHART,
   -  LOG_ACTIONS_FORCE_REFRESH_CHART,
   -  LOG_ACTIONS_EXPORT_CSV_DASHBOARD_CHART,
   -  LOG_ACTIONS_CHANGE_DASHBOARD_FILTER,
   -  LOG_ACTIONS_CHANGE_EXPLORE_CONTROLS,
   -  LOG_ACTIONS_TOGGLE_EDIT_DASHBOARD,
   -  LOG_ACTIONS_FORCE_REFRESH_DASHBOARD,
   -  LOG_ACTIONS_PERIODIC_RENDER_DASHBOARD,
   -  LOG_ACTIONS_OMNIBAR_TRIGGERED,
   -  LOG_ACTIONS_MOUNT_EXPLORER,
   -]);
   -
   -export const Logger = {
   -  // note that this returns ms since page load, NOT ms since epoc
   -  getTimestamp() {
   -    return Math.round(window.performance.now());
   -  },
   -};
   diff --git a/superset-frontend/src/logger/actions/index.js b/superset-frontend/src/logger/actions/index.js
   deleted file mode 100644
   index f319068e6..000000000
   --- a/superset-frontend/src/logger/actions/index.js
   +++ /dev/null
   @@ -1,30 +0,0 @@
   -/**
   - * Licensed to the Apache Software Foundation (ASF) under one
   - * or more contributor license agreements.  See the NOTICE file
   - * distributed with this work for additional information
   - * regarding copyright ownership.  The ASF licenses this file
   - * to you under the Apache License, Version 2.0 (the
   - * "License"); you may not use this file except in compliance
   - * with the License.  You may obtain a copy of the License at
   - *
   - *   http://www.apache.org/licenses/LICENSE-2.0
   - *
   - * Unless required by applicable law or agreed to in writing,
   - * software distributed under the License is distributed on an
   - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   - * KIND, either express or implied.  See the License for the
   - * specific language governing permissions and limitations
   - * under the License.
   - */
   -export const LOG_EVENT = 'LOG_EVENT';
   -
   -export function logEvent(eventName, eventData) {
   -  return dispatch =>
   -    dispatch({
   -      type: LOG_EVENT,
   -      payload: {
   -        eventName,
   -        eventData,
   -      },
   -    });
   -}
   diff --git a/superset-frontend/src/logger/constants.ts b/superset-frontend/src/logger/constants.ts
   new file mode 100644
   index 000000000..f30814469
   --- /dev/null
   +++ b/superset-frontend/src/logger/constants.ts
   @@ -0,0 +1,42 @@
   +export const LOG_EVENTS = {
   +  load_chart: 'load_chart',
   +  render_chart: 'render_chart',
   +  hide_browser_tab: 'hide_browser_tab',
   +  mount_dashboard: 'mount_dashboard',
   +  mount_explorer: 'mount_explorer',
   +  select_dashboard_tab: 'select_dashboard_tab',
   +  force_refresh_chart: 'force_refresh_chart',
   +  change_explore_controls: 'change_explore_controls',
   +  toggle_edit_dashboard: 'toggle_edit_dashboard',
   +  force_refresh_dashboard: 'force_refresh_dashboard',
   +  periodic_render_dashboard: 'periodic_render_dashboard',
   +  explore_dashboard_chart: 'explore_dashboard_chart',
   +  export_csv_dashboard_chart: 'export_csv_dashboard_chart',
   +  change_dashboard_filter: 'change_dashboard_filter',
   +  omnibar_triggered: 'omnibar_triggered',
   +};
   +
   +export type LogEventName = keyof typeof LOG_EVENTS;
   +
   +export type LogEventPayload<T> = Record<string, any>;
   +
   +// Log event types --------------------------------------------------------------
   +export const LOG_TIMING_EVENTS = new Set([
   +  LOG_EVENTS.load_chart,
   +  LOG_EVENTS.render_chart,
   +  LOG_EVENTS.hide_browser_tab,
   +]);
   +export const LOG_USER_ACTION_EVENTS = new Set([
   +  LOG_EVENTS.mount_dashboard,
   +  LOG_EVENTS.select_dashboard_tab,
   +  LOG_EVENTS.explore_dashboard_chart,
   +  LOG_EVENTS.force_refresh_chart,
   +  LOG_EVENTS.export_csv_dashboard_chart,
   +  LOG_EVENTS.change_dashboard_filter,
   +  LOG_EVENTS.change_explore_controls,
   +  LOG_EVENTS.toggle_edit_dashboard,
   +  LOG_EVENTS.force_refresh_dashboard,
   +  LOG_EVENTS.periodic_render_dashboard,
   +  LOG_EVENTS.omnibar_triggered,
   +  LOG_EVENTS.mount_explorer,
   +]);
   diff --git a/superset-frontend/src/logger/index.ts b/superset-frontend/src/logger/index.ts
   new file mode 100644
   index 000000000..c9a5120ed
   --- /dev/null
   +++ b/superset-frontend/src/logger/index.ts
   @@ -0,0 +1,28 @@
   +import { Dispatch } from 'react-redux';
   +import { LogEventName, LogEventPayload } from './constants';
   +
   +export * from './constants';
   +
   +export const LOG_EVENT = 'LOG_EVENT';
   +
   +/**
   + * Rounded milliseconds since page load started.
   + * Ref: https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
   + */
   +export function getTimeSincePageLoad() {
   +  return Math.round(window.performance.now());
   +}
   +
   +export function logEvent<T extends LogEventName>(
   +  eventName: T,
   +  eventData: LogEventPayload<T>,
   +) {
   +  return (dispatch: Dispatch<never>) =>
   +    dispatch({
   +      type: LOG_EVENT,
   +      payload: {
   +        eventName,
   +        eventData,
   +      },
   +    });
   +}
   
   ```




----------------------------------------------------------------
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.

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] [incubator-superset] ktmud commented on a change in pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#discussion_r485785853



##########
File path: superset-frontend/src/logger/actions/index.ts
##########
@@ -16,10 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { Dispatch } from 'react-redux';
+
 export const LOG_EVENT = 'LOG_EVENT';
 
-export function logEvent(eventName, eventData) {
-  return dispatch =>
+export function logEvent(eventName: string, eventData: Record<string, any>) {
+  return (dispatch: Dispatch<any>) =>

Review comment:
       I think this `any` can be `never`




----------------------------------------------------------------
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.

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] [incubator-superset] etr2460 commented on a change in pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
etr2460 commented on a change in pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#discussion_r530103510



##########
File path: superset-frontend/src/logger/actions/index.ts
##########
@@ -16,10 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { Dispatch } from 'react-redux';
+
 export const LOG_EVENT = 'LOG_EVENT';
 
-export function logEvent(eventName, eventData) {
-  return dispatch =>
+export function logEvent(eventName: string, eventData: Record<string, any>) {

Review comment:
       Unfortunately i lost this for a couple months and now your patch doesn't apply cleanly :( i think i'll merge this as is for now, but agree that something like this would be nice in the future




----------------------------------------------------------------
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.

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] [incubator-superset] codecov-io edited a comment on pull request #10815: chore: type src/logger

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #10815:
URL: https://github.com/apache/incubator-superset/pull/10815#issuecomment-733461237


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=h1) Report
   > Merging [#10815](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=desc) (2f01340) into [master](https://codecov.io/gh/apache/incubator-superset/commit/872a54d304f637e695e677233d7267aa56605d75?el=desc) (872a54d) will **decrease** coverage by `3.74%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10815/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10815      +/-   ##
   ==========================================
   - Coverage   67.29%   63.55%   -3.75%     
   ==========================================
     Files         905      448     -457     
     Lines       43862    27567   -16295     
     Branches     4201        0    -4201     
   ==========================================
   - Hits        29519    17520   -11999     
   + Misses      14239    10047    -4192     
   + Partials      104        0     -104     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.55% <ø> (-0.10%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
   | [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.04% <0.00%> (-0.82%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `90.49% <0.00%> (-0.74%)` | :arrow_down: |
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `73.74% <0.00%> (-0.46%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.20% <0.00%> (-0.27%)` | :arrow_down: |
   | [superset-frontend/src/components/Label/index.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGFiZWwvaW5kZXgudHN4) | | |
   | [superset-frontend/src/components/TableLoader.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVGFibGVMb2FkZXIudHN4) | | |
   | ... and [453 more](https://codecov.io/gh/apache/incubator-superset/pull/10815/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=footer). Last update [872a54d...2f01340](https://codecov.io/gh/apache/incubator-superset/pull/10815?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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