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

Allow setting integration key with env var #101

Closed
wants to merge 2 commits into from

Conversation

SteadyGiant
Copy link

@SteadyGiant SteadyGiant commented Jun 22, 2022

Description of change

I want to set my Pendo integration key without exposing it in a plain text config.json file. Following other Singer connectors, I added a few lines to utils.py which use environment variable X_PENDO_INTEGRATION_KEY if it exists and if x_pendo_integration_key isn't in config.json. It'll still throw an error if neither exists.

This would resolve #109.

Manual QA steps

I actually can't get any tests to run with python -m pytest --verbose. Can someone more familiar with this project confirm that command runs without import errors?

Risks

  • This change is untested, and so shouldn't be trusted.

Rollback steps

  • revert this branch

Code style

I tried to keep things as plain and explicit as possible:

if "x_pendo_integration_key" not in config:
    env_key = os.getenv("X_PENDO_INTEGRATION_KEY")
    if env_key is not None:
        config["x_pendo_integration_key"] = env_key

But it may not the most succinct way to do it--or even the best way. Feel free to change this to a better way.

@singer-bot
Copy link

Hi @Everettttt, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

@SteadyGiant
Copy link
Author

I signed the CLA. Will this update?

@luandy64
Copy link
Contributor

luandy64 commented Aug 3, 2022

Hi @Everettttt, thanks for the submission! I see your completed CLA and am not entirely sure why the bot failed to run again. So I've gone ahead and removed the label

@somethingmorerelevant
Copy link
Member

somethingmorerelevant commented Apr 5, 2023

Hello @Everettttt , Thank you for your contribution
However, all the singer taps access the required credentials from the config file provided, this change in the tap is not aligned with the singer standards, hence closing this P.R
https://github.com/singer-io/getting-started/blob/master/docs/CONFIG_AND_STATE.md#config-file

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.

[Feature Request] Get Pendo integration key from env var
4 participants