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

make tzpro_api_key optional #694

Merged
merged 3 commits into from
Feb 7, 2024
Merged

Conversation

nicolasochem
Copy link
Contributor

@nicolasochem nicolasochem commented Feb 6, 2024

Screenshot from 2024-02-06 15-14-28

Most TRD users use tzkt as backend. Right now, we make it mandatory to pass tzpro_api_key = '' in the config.

I'm introducing a new method to set default attributes in code. In this case, the default tzpro_api_key is None.

I verified that when using the tzpro provider, the program still fails later when the key is unset:

2024-02-06 15:07:29,721 - MainThread - INFO - Failed to get network
configuration constants from a local node (http://127.0.0.1:8732).
2024-02-06 15:07:29,731 - MainThread - INFO - Loading baking
configuration file baker_actual_tzkt/cfg/baker.yaml
2024-02-06 15:07:29,737 - MainThread - ERROR - [Process Life Cycle
completing With Failure] Error Details: Please set a tzpro api key in
 the config to use this block api!

I also verified that tzkt payout works with the param missing from the config.

All previous parameters remain mandatory, for now.

Work effort: 1hr

Most TRD users use tzkt as backend. Right now, we make it mandatory to
pass `tzpro_api_key = ''` in the config.

I'm introducing a new method to set default attributes in code. In this
case, the default tzpro_api_key is `None`.

I verified that when using the tzpro provider, the program still fails
later when the key is unset:

```
2024-02-06 15:07:29,721 - MainThread - INFO - Failed to get network
configuration constants from a local node (http://127.0.0.1:8732).
2024-02-06 15:07:29,731 - MainThread - INFO - Loading baking
configuration file baker_actual_tzkt/cfg/baker.yaml
2024-02-06 15:07:29,737 - MainThread - ERROR - [Process Life Cycle
completing With Failure] Error Details: Please set a tzpro api key in
 the config to use this block api!
 ```

 All previous parameters remain mandatory, for now.
@nicolasochem nicolasochem marked this pull request as ready for review February 7, 2024 01:05
@jdsika jdsika added the enhancement New feature or request label Feb 7, 2024
@jdsika jdsika added this to the v12.0 (Nairobi) milestone Feb 7, 2024
@jdsika jdsika merged commit 648cfde into master Feb 7, 2024
10 checks passed
@jdsika jdsika deleted the nicolasochem@optional_tzpro_api_key branch February 7, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants