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

Fixing a couple Recents API corner cases #42813

Merged
merged 14 commits into from
May 21, 2024
Merged

Fixing a couple Recents API corner cases #42813

merged 14 commits into from
May 21, 2024

Conversation

escherize
Copy link
Contributor

@escherize escherize commented May 17, 2024

We can't really rely on some app db constraints, so I am filtering out invalid recent view items for entities that are e.g. missing parent collections.

  • remove an extra def that snuck itself into the tests
  • uncomment + fix 2 tests
  • ensure the parent collection for a card/model/dashaboard exists
  • official is a string
  • ensure the database for a recent table exists

- remove def wtf
- uncomment + fix tests
@escherize escherize requested a review from camsaul as a code owner May 17, 2024 03:30
@escherize escherize requested a review from a team May 17, 2024 03:30
@metabase-bot metabase-bot bot added the .Team/AdminWebapp Admin and Webapp team label May 17, 2024
@escherize escherize added the no-backport Do not backport this PR to any branch label May 17, 2024
Copy link

replay-io bot commented May 17, 2024

Status Complete ↗︎
Commit bb64759
Results
⚠️ 3 Flaky
2567 Passed

@escherize escherize changed the title handle visibilty_type on tables Fixing a couple Recents API corner cases May 20, 2024
- This seems like something that should never happen, but I've seen it
happen. I think it might be possible from a down/up migration.
src/metabase/models/recent_views.clj Show resolved Hide resolved
src/metabase/models/recent_views.clj Outdated Show resolved Hide resolved
@escherize escherize merged commit 790a647 into master May 21, 2024
107 checks passed
@escherize escherize deleted the bcm-unwtf-recents branch May 21, 2024 22:07
Copy link

@escherize Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

oisincoveney pushed a commit that referenced this pull request May 22, 2024
* handle visibilty_type on tables

- remove def wtf
- uncomment + fix tests

* make sure parent colls exist on report_cards

- official is a string
- ensure the database for a recent table exists

* remove def + improve arg name

* docstring

* improve + extract valid parent collection check

* grab the entity's colllection id and use that for the validity test

- This seems like something that should never happen, but I've seen it
happen. I think it might be possible from a down/up migration.

* fix tests

* fix more tests

* cleanup

* fixing another test

* add error-avoider, to filter bad items in prod instead of throwing

- improve recent view testing for table

* remove wrap (it double prints the value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/AdminWebapp Admin and Webapp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants