-
Notifications
You must be signed in to change notification settings - Fork 41
feat: Support standard environment variables #509
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 standard environment variables #509
Conversation
Pull Request Test Coverage Report for Build 11739142105Details
💛 - Coveralls |
d2d7ac9 to
a2f3e0a
Compare
felicijus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising. 🚀
2dc98ec to
0ddbdac
Compare
|
I will review again 🚀 |
|
@felicijus @dimastbk do you have time for another review? |
|
Sorry forgot to finish mine... Released it now. but thats not everything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should cover everything for now.
If we use a sentinal like this:
Unset = str("UNSET")We solve the problem of None as a valid value and pseudo Optional arguments, meaning we can eliminate them.
This means for real Optional arguments the User can define None as a valid value. 🤖
BREAKING CHANGES: Default values for arguments of create_oauth2_client_credentials_channel() and create_camunda_cloud_channel() have changed to Unset. Also order of create_camunda_cloud_channel() arguments was changed.
12535fc to
4229505
Compare
|
@felicijus I have applied your latest suggestions, but needed to make some adjustments. E.g. the functions Also I have seen that version |
|
Thank you. I will look into it this afternoon. |
|
Docs will be done by you @PSanetra ? |
|
@felicijus I can do that, but I am not sure where to put them. Do you have a suggestion? I think it should generally be just documentation of the supported environment variables, right? |
|
Yes general support with what is supported as a seperate section, and add a short description to each channel creating function and the defaults used. About the breaking changes, yes and no... At least for the oauth channel creation - no. There was no support for Environment variables at all and you also had no imposter So I guess 4.1.0 or whatever @dimastbk decides. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Maybe try to reach higher test coverage.
BREAKING CHANGES: Default values for arguments of create_oauth2_client_credentials_channel() and create_camunda_cloud_channel() have changed to Unset. Also order of create_camunda_cloud_channel() arguments was changed.
529d0b7 to
5b9648c
Compare
|
@felicijus I have added some documentation can you review it? I did not write reStructuredText docs before. I have also added some tests which should improve coverage. |
felicijus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested some changes...
Please add this to the end of docs/channels_reference.rst to complete Channel Reference.
Utilities (Environment)
-----------------------
.. autofunction:: pyzeebe.channel.utils.get_zeebe_address
.. autofunction:: pyzeebe.channel.utils.get_camunda_oauth_url
.. autofunction:: pyzeebe.channel.utils.get_camunda_client_id
.. autofunction:: pyzeebe.channel.utils.get_camunda_client_secret
.. autofunction:: pyzeebe.channel.utils.get_camunda_cluster_id
.. autofunction:: pyzeebe.channel.utils.get_camunda_cluster_region
.. autofunction:: pyzeebe.channel.utils.get_camunda_token_audience
.. autofunction:: pyzeebe.channel.utils.get_camunda_address
422543d to
ae19fdd
Compare
|
@felicijus Alright I have applied the suggestions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed some rst formatting.
Inline code:
``"localhost:26500"``
After that we are done I think. ✅
|
@felicijus Alright I have applied that suggestion as well. I think when you want to merge this PR it makes sense to squash all the commit into one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. ✅
@dimastbk Please have a look and see if this can be released in 4.0.x...
BREAKING CHANGES: Default values for arguments of create_oauth2_client_credentials_channel() and create_camunda_cloud_channel() have changed to Unset. Also order of create_camunda_cloud_channel() arguments was changed.
…`create_insecure_channel`
Co-authored-by: Felix Schneider <[email protected]>
Co-authored-by: Felix Schneider <[email protected]>
f647ecd to
f951a9a
Compare
|
@dimastbk I have rebased the PR onto master. I have also fixed the linting issues, found in the CI, but I am not sure were you found the errors, regarding the indentation in the docs. |
|
@dimastbk I have resolved the remaining indentation issues. |
|
Thanks! And @felicijus thanks for review |
Closes #81
Changes
oauth_channel.create_oauth2_client_credentials_channel()andoauth_channel.create_camunda_cloud_channel()optionalAPI Updates
New Features (required)
oauth_channel.create_oauth2_client_credentials_channel()andoauth_channel.create_camunda_cloud_channel()support the following environment variables:ZEEBE_ADDRESSCAMUNDA_CLUSTER_IDCAMUNDA_CLUSTER_REGIONCAMUNDA_CLIENT_IDZEEBE_CLIENT_IDCAMUNDA_CLIENT_SECRETZEEBE_CLIENT_SECRETCAMUNDA_OAUTH_URLZEEBE_AUTHORIZATION_SERVER_URLCAMUNDA_CREDENTIALS_SCOPESCAMUNDA_TOKEN_AUDIENCEZEEBE_TOKEN_AUDIENCEChecklist