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

Add single selection mode to picker #27624

Merged
merged 1 commit into from Jan 11, 2023
Merged

Conversation

ranquild
Copy link
Contributor

@ranquild ranquild commented Jan 11, 2023

Epic #26898

How to verify:

  • Open a dashboard with a card
  • Edit -> Filter -> Text -> Dropdown
  • Connect the parameter to the card
  • Click Dropdown list -> Edit in the parameter sidebar
  • Click From another question or model and pick a question
  • When selecting multiple questions, only the last should be selected

This change is Reviewable

@ranquild ranquild self-assigned this Jan 11, 2023
@ranquild ranquild marked this pull request as ready for review January 11, 2023 12:29
@ranquild ranquild requested review from kulyk and a team January 11, 2023 12:29
@deploysentinel
Copy link

deploysentinel bot commented Jan 11, 2023

Current Test Results Summary

✅ 1370 Passing - ❌ 7 Failing - ⚠️ 4 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 01/11/2023 01:12:08pm UTC)

Run Details

Running Workflow E2E Tests for PR on Github Actions

Commit: e07e6cce10a5ab05ab63acc5ef5300c37c37296f

Started: 01/11/2023 12:49:33pm UTC

❌ Failures

📄   frontend/test/metabase/scenarios/question/reproductions/15714-cc-postgres-percentile-accepts-two-params.cy.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
postgres > question > custom columns `Percentile` custom expression function should accept two parameters (#15714)
Retry 2Retry 1Initial Attempt
Error: `cy.request()` failed on:...
`cy.request()` failed on:

http://localhost:4000/api/testing/restore/postgres-12

The response we received from your web server was:

  > 500: Internal Server Error

This was considered a failure because the status code was not `2xx` or `3xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

-----------------------------------------------------------

The request we sent was:

Method: POST
URL: http://localhost:4000/api/testing/restore/postgres-12
Headers: {
  "Connection": "keep-alive",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/108.0.5359.98 Safari/537.36",
  "accept": "*/*",
  "accept-encoding": "gzip, deflate",
  "content-length": 0
}

-----------------------------------------------------------

The response we got was:

Status: 500 - Internal Server Error
Headers: {
  "cache-control": "must-revalidate,no-cache,no-store",
  "content-type": "text/html;charset=iso-8859-1",
  "content-length": "1117",
  "server": "Jetty(9.4.50.v20221201)"
}
Body: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</title>
</head>
<body><h2>HTTP ERROR 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</h2>
<table>
<tr><th>URI:</th><td>/api/testing/restore/postgres-12</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</td></tr>
<tr><th>SERVLET:</th><td>-</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.50.v20221201</a><hr/>

</body>
</html>

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `postgres > question > custo...`
3.40% (10) 10 / 294 runs
failed over last 7 days
0% (0) 0 / 294 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/question/reproductions/13263-postgres-show-row-details-on-pk-click.cy.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
postgres > user > query should show row details when clicked on its entity key (#13263)
Retry 2Retry 1Initial Attempt
Error: `cy.request()` failed on:...
`cy.request()` failed on:

http://localhost:4000/api/testing/restore/postgres-12

The response we received from your web server was:

  > 500: Internal Server Error

This was considered a failure because the status code was not `2xx` or `3xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

-----------------------------------------------------------

The request we sent was:

Method: POST
URL: http://localhost:4000/api/testing/restore/postgres-12
Headers: {
  "Connection": "keep-alive",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/108.0.5359.98 Safari/537.36",
  "accept": "*/*",
  "accept-encoding": "gzip, deflate",
  "content-length": 0
}

-----------------------------------------------------------

The response we got was:

Status: 500 - Internal Server Error
Headers: {
  "cache-control": "must-revalidate,no-cache,no-store",
  "content-type": "text/html;charset=iso-8859-1",
  "content-length": "1117",
  "server": "Jetty(9.4.50.v20221201)"
}
Body: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</title>
</head>
<body><h2>HTTP ERROR 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</h2>
<table>
<tr><th>URI:</th><td>/api/testing/restore/postgres-12</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</td></tr>
<tr><th>SERVLET:</th><td>-</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.50.v20221201</a><hr/>

</body>
</html>

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `postgres > user > query`
3.40% (10) 10 / 294 runs
failed over last 7 days
0% (0) 0 / 294 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/question/reproductions/13097-mongo-apply-distinct-count-multiple-columns.cy.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
issue 13097 should correctly apply distinct count on multiple columns (#13097)
Retry 2Retry 1Initial Attempt
Error: `cy.request()` failed on:...
`cy.request()` failed on:

http://localhost:4000/api/testing/restore/mongo-4

The response we received from your web server was:

  > 500: Internal Server Error

This was considered a failure because the status code was not `2xx` or `3xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

-----------------------------------------------------------

The request we sent was:

Method: POST
URL: http://localhost:4000/api/testing/restore/mongo-4
Headers: {
  "Connection": "keep-alive",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/108.0.5359.98 Safari/537.36",
  "accept": "*/*",
  "accept-encoding": "gzip, deflate",
  "content-length": 0
}

-----------------------------------------------------------

The response we got was:

Status: 500 - Internal Server Error
Headers: {
  "cache-control": "must-revalidate,no-cache,no-store",
  "content-type": "text/html;charset=iso-8859-1",
  "content-length": "1113",
  "server": "Jetty(9.4.50.v20221201)"
}
Body: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</title>
</head>
<body><h2>HTTP ERROR 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</h2>
<table>
<tr><th>URI:</th><td>/api/testing/restore/mongo-4</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</td></tr>
<tr><th>SERVLET:</th><td>-</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.50.v20221201</a><hr/>

</body>
</html>

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `issue 13097`
3.40% (10) 10 / 294 runs
failed over last 7 days
0% (0) 0 / 294 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/question/summarization.cy.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
scenarios > question > summarize sidebar removing all aggregations should show add aggregation button with label
Retry 2Retry 1Initial Attempt
Error: `cy.request()` failed on:...
`cy.request()` failed on:

http://localhost:4000/api/testing/restore/default

The response we received from your web server was:

  > 500: Internal Server Error

This was considered a failure because the status code was not `2xx` or `3xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

-----------------------------------------------------------

The request we sent was:

Method: POST
URL: http://localhost:4000/api/testing/restore/default
Headers: {
  "Connection": "keep-alive",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/108.0.5359.98 Safari/537.36",
  "accept": "*/*",
  "accept-encoding": "gzip, deflate",
  "content-length": 0
}

-----------------------------------------------------------

The response we got was:

Status: 500 - Internal Server Error
Headers: {
  "cache-control": "must-revalidate,no-cache,no-store",
  "content-type": "text/html;charset=iso-8859-1",
  "content-length": "1113",
  "server": "Jetty(9.4.50.v20221201)"
}
Body: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</title>
</head>
<body><h2>HTTP ERROR 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</h2>
<table>
<tr><th>URI:</th><td>/api/testing/restore/default</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</td></tr>
<tr><th>SERVLET:</th><td>-</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.50.v20221201</a><hr/>

</body>
</html>

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `scenarios > question > summ...`
3.37% (10) 10 / 297 runs
failed over last 7 days
0% (0) 0 / 297 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/question/settings.cy.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
scenarios > question > settings column settings should allow you to remove a column and add two foreign columns
Retry 2Retry 1Initial Attempt
Error: `cy.request()` failed on:...
`cy.request()` failed on:

http://localhost:4000/api/testing/restore/default

The response we received from your web server was:

  > 500: Internal Server Error

This was considered a failure because the status code was not `2xx` or `3xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

-----------------------------------------------------------

The request we sent was:

Method: POST
URL: http://localhost:4000/api/testing/restore/default
Headers: {
  "Connection": "keep-alive",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/108.0.5359.98 Safari/537.36",
  "accept": "*/*",
  "accept-encoding": "gzip, deflate",
  "content-length": 0
}

-----------------------------------------------------------

The response we got was:

Status: 500 - Internal Server Error
Headers: {
  "cache-control": "must-revalidate,no-cache,no-store",
  "content-type": "text/html;charset=iso-8859-1",
  "content-length": "1113",
  "server": "Jetty(9.4.50.v20221201)"
}
Body: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</title>
</head>
<body><h2>HTTP ERROR 500 Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</h2>
<table>
<tr><th>URI:</th><td>/api/testing/restore/default</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Table &quot;SETTING&quot; not found (this database is empty); SQL statement:
SELECT &quot;SETTING&quot;.&quot;VALUE&quot; FROM &quot;SETTING&quot; WHERE (&quot;KEY&quot; = ? AND &quot;VALUE&quot; &gt; ?) LIMIT 1 [42104-212]</td></tr>
<tr><th>SERVLET:</th><td>-</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.50.v20221201</a><hr/>

</body>
</html>

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `scenarios > question > sett...`
3.37% (10) 10 / 297 runs
failed over last 7 days
0% (0) 0 / 297 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/question/saved.cy.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
scenarios > question > saved should should correctly display 'Save' modal (#13817)
Retry 2Retry 1Initial Attempt
Error: `cy.request()` timed out waiting `30000ms` for a response from your server....
`cy.request()` timed out waiting `30000ms` for a response from your server.

The request we sent was:

Method: POST
URL: http://localhost:4000/api/testing/restore/default

No response was received within the timeout.

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `scenarios > question > saved`
3.36% (10) 10 / 298 runs
failed over last 7 days
0% (0) 0 / 298 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/question/question-management.cy.spec.js • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
managing question from the question's details sidebar curate access nodata user should be able to archive the question (#11719-3, #16512, #20133)
Retry 2Retry 1Initial Attempt
Error: `cy.request()` timed out waiting `30000ms` for a response from your server....
`cy.request()` timed out waiting `30000ms` for a response from your server.

The request we sent was:

Method: POST
URL: http://localhost:4000/api/testing/restore/default

No response was received within the timeout.

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `managing question from the ...`
0.34% (1) 1 / 292 run
failed over last 7 days
0% (0) 0 / 292 runs
flaked over last 7 days

⚠️ Flakes

📄   frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
scenarios > question > object details should work with non-numeric IDs (metabse#22768)
Retry 1Initial Attempt
2.59% (8) 8 / 309 runs
failed over last 7 days
1.94% (6) 6 / 309 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/visualizations/maps.cy.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
scenarios > visualizations > maps should not assign the full name of the state as the filter value on a drill-through (#14650)
Retry 1Initial Attempt
2.55% (8) 8 / 314 runs
failed over last 7 days
20.70% (65) 65 / 314 runs
flaked over last 7 days

📄   frontend/test/metabase/scenarios/visualizations/line_chart.cy.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
scenarios > visualizations > line chart should correctly display tooltip values when X-axis is numeric and style is 'Ordinal' (#15998)
Retry 1Initial Attempt
3.17% (10) 10 / 315 runs
failed over last 7 days
0.32% (1) 1 / 315 run
flaked over last 7 days

📄   frontend/test/metabase/scenarios/dashboard/click-behavior.cy.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
scenarios > dashboard > dashboard cards > click behavior should not change the visualization type in a targetted question with mapped filter (#16334)
Retry 1Initial Attempt
4.75% (15) 15 / 316 runs
failed over last 7 days
0.32% (1) 1 / 316 run
flaked over last 7 days


@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Base: 65.47% // Head: 65.48% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (ea59245) compared to base (6a31962).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #27624   +/-   ##
=======================================
  Coverage   65.47%   65.48%           
=======================================
  Files        3184     3184           
  Lines       93001    93000    -1     
  Branches    11811    11810    -1     
=======================================
+ Hits        60896    60897    +1     
+ Misses      27207    27206    -1     
+ Partials     4898     4897    -1     
Flag Coverage Δ
front-end 47.07% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ners/DataPicker/CardPicker/CardPickerContainer.tsx 88.00% <ø> (ø)
...ataPicker/RawDataPicker/RawDataPickerContainer.tsx 88.88% <ø> (ø)
...etabase/containers/DataPicker/useSelectedTables.ts 79.16% <100.00%> (+7.16%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ranquild ranquild enabled auto-merge (squash) January 11, 2023 14:10
@ranquild ranquild merged commit 26423c6 into master Jan 11, 2023
@ranquild ranquild deleted the 26898-data-picker-single-mode branch January 11, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants