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

Update README re: environment variables #584

Closed
wants to merge 3 commits into from

Conversation

cjwetherington
Copy link

Updating README to reflect that a value for SENTRY_DSN is required. When getting this running locally (sans Docker), I encountered a fatal error indicating that this environment variable was unset. After reviewing harvester/config.py l.17, it became clear that it's required, and l.57 of same indicates "none" needs to be used for opt-out.

Cheers for this great OAI tool.

@ghukill
Copy link
Contributor

ghukill commented Dec 11, 2024

Hey @cjwetherington, thanks for opening a PR! Glad you're finding this CLI app potentially useful.

Can confirm that without SENTRY_DSN set, an error is thrown, where even this --help call is enough to trigger the error during configuration:

pipenv run oai --verbose \
-o /tmp/test.xml \
-h http://example.com \
harvest --help

We chatted very briefly internally and concluded that we also don't find it ideal that Sentry is strictly required (or explicitly not used via SENTRY_DSN=none).

As such, would like to propose an alternative that makes even the presence of SENTRY_DSN optional. If we were to move SENTRY_DSN from REQUIRED_ENV_VARS to OPTIONAL_ENV_VARS here, that should support omitting that environment variable altogether.

Would that work for your purposes? It aligns with our preferred ways of working with the application as well. Let us know if you'd like to explore that option via a commit in this PR, or we could push a commit to this PR, etc.

@cjwetherington
Copy link
Author

Hello there, @ghukill! Thanks for your very speedy reply. In retrospect, I probably should have just opened an issue rather than proposing revised docs, so apologies if I made things more complex than they need to be.

I quickly swapped SENTRY_DSN from the required to the optional set, but that seems to have triggered some sort of downstream parsing error:

image

image

I haven't got time at the moment to play with it much more than that, so feel free to add a commit here if you like, or even close this if the doc update won't be needed—otherwise I can have a peek sometime later this week and see if I can get it sorted. Thanks!

@cjwetherington
Copy link
Author

Never mind; it occurred to me while walking back from lunch that it was just a problem of notation (trailing comma needed). I pushed that and revised the README accordingly. Let me know if there's anything else. : )

@ghukill ghukill self-requested a review December 11, 2024 19:52
@ghukill
Copy link
Contributor

ghukill commented Dec 11, 2024

Never mind; it occurred to me while walking back from lunch that it was just a problem of notation (trailing comma needed). I pushed that and revised the README accordingly. Let me know if there's anything else. : )

The 'ole trailing comma. Nice catch.

Changes look great, and align with our usage of the application as well. Just waiting on some internal review, but will hopefully merge (and tag a new release) fairly quick here.

Thanks again for the PR and reaching out!

@cjwetherington
Copy link
Author

@ghukill My distinct pleasure. Just starting to use this to test and debug our OJS metadata endpoints, and it was the best tool I found by far, so kudos to you and team, and if I happen to come upon any other snags, I'll file an issue.

@ghukill
Copy link
Contributor

ghukill commented Dec 12, 2024

Hey @cjwetherington - sorry for the churn here, but we're opting to close this PR in favor of one created by us internally, with the exact changes you have provided here. We need to solve for some CI/CD interactions with PRs opened from folks outside the library, and don't want to hold up this update.

Thanks again! That new PR should be merged shortly.

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.

3 participants