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

feat: Support --metabase_session_id #83

Conversation

lawrencejones
Copy link
Contributor

Metabase lacks proper support for authenticating from automation, which
means we have to exchange a username and password for a session token
before each invocation of this command.

These count as login attempts, which are rate limited. Depending on your
needs, you may hit the rate limit and find your schemas can no longer be
synced.

Providing a --metabase_session_id allows the user to reuse and existing
Metabase session, should they have it, allowing them to avoid the login
rate limits (and in some cases, an annoying email!).

Metabase lacks proper support for authenticating from automation, which
means we have to exchange a username and password for a session token
before each invocation of this command.

These count as login attempts, which are rate limited. Depending on your
needs, you may hit the rate limit and find your schemas can no longer be
synced.

Providing a --metabase_session_id allows the user to reuse and existing
Metabase session, should they have it, allowing them to avoid the login
rate limits (and in some cases, an annoying email!).
@lawrencejones
Copy link
Contributor Author

Hey team! I haven't written any Python in years so this is unlikely to work, but I'd love early feedback on the proposed change.

I'll make sure this is actually functional once it gets the green light.

@gouline
Copy link
Owner

gouline commented Jan 13, 2022

Approach looks fine overall, you have some syntax errors as the CI shows. Please run these checks locally to debug and let me know when you're ready for a code review.

@lawrencejones
Copy link
Contributor Author

Yep, I definitely eye balled this! Now I know you're ok with the approach I'll fix it up on Monday :)

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

gouline commented Jul 5, 2022

@lawrencejones Still planning to get this merged?

@gouline gouline changed the title Support --metabase_session_id feat: Support --metabase_session_id Jul 6, 2022
@gouline gouline changed the base branch from master to feat/session-token July 6, 2022 01:20
@gouline gouline merged commit 0479ed6 into gouline:feat/session-token Jul 6, 2022
@gouline gouline mentioned this pull request Jul 6, 2022
gouline added a commit that referenced this pull request Jul 6, 2022
* Support --metabase_session_id (#83)

Metabase lacks proper support for authenticating from automation, which
means we have to exchange a username and password for a session token
before each invocation of this command.

These count as login attempts, which are rate limited. Depending on your
needs, you may hit the rate limit and find your schemas can no longer be
synced.

Providing a --metabase_session_id allows the user to reuse and existing
Metabase session, should they have it, allowing them to avoid the login
rate limits (and in some cases, an annoying email!).

Co-authored-by: Mike Gouline <[email protected]>

* Fix CI errors

Co-authored-by: Lawrence Jones <[email protected]>
@lawrencejones
Copy link
Contributor Author

Ah sorry about this, haven't had a chance to get back to our data stuff since I was first working on it.

Appreciate you getting this over the line 🙌

@lawrencejones lawrencejones deleted the lawrence-metabase-session-token branch July 6, 2022 08:33
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.

2 participants