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

fix: Handle 404s for deactivated users when exporting exposures #96

Merged
merged 4 commits into from
Jul 6, 2022

Conversation

kochalex
Copy link
Contributor

@kochalex kochalex commented Apr 19, 2022

This fixes an issue where exporting exposures crashes dbt-metabase when the owner of a card is a deactivated user. The metabase API has a check if a user is deactivated when running a GET to /api/user/:id and returns a 404.

Fixes: #88

dbtmetabase/metabase.py Outdated Show resolved Hide resolved
@kochalex kochalex marked this pull request as draft April 19, 2022 22:31
@kochalex kochalex marked this pull request as ready for review April 19, 2022 23:31
dbtmetabase/metabase.py Outdated Show resolved Hide resolved
tests/fixtures/mock_api/api/card/3.json Show resolved Hide resolved
@kochalex
Copy link
Contributor Author

Updated the error handling - I'm also happy to add a new card to the mocked responses to test the 404 per your other comment if you would like.

@gouline gouline added the stalled label May 1, 2022
@z3z1ma
Copy link
Contributor

z3z1ma commented May 5, 2022

I'm good with this pending the additional test mock plus making CI pass.

@gouline
Copy link
Owner

gouline commented Jul 5, 2022

@kochalex Still planning to get this merged?

@gouline gouline changed the title Handle 404s for deactivated users when exporting exposures fix: Handle 404s for deactivated users when exporting exposures Jul 6, 2022
@gouline gouline merged commit d51bd81 into gouline:master Jul 6, 2022
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.

Deactiveted user in metabase causes an error during exposures sync
3 participants