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

add user agent and use case info to faucet json body #572

Merged
merged 11 commits into from
Jun 13, 2023

Conversation

jonathanlei
Copy link
Collaborator

@jonathanlei jonathanlei commented May 11, 2023

High Level Overview of Change

aadd user agent and use case info to faucet transactions for analytics

Context of Change

This is part of the testnet analytics effort.

Type of Change

[ X] New feature (non-breaking change which adds functionality)

@@ -31,6 +31,7 @@ async def generate_faucet_wallet(
wallet: Optional[Wallet] = None,
debug: bool = False,
faucet_host: Optional[str] = None,
use_case: Optional[str] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just call this param user_agent? use_case is a very confusing name IMO

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We suggested that it be moved to json instead of http header

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user_agent is specific to xrpl.js - use-case is pointing towards things like: workshop, int test, unit tests..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a follow up PR which sets use_case="integration_test" or use_case="unit_test"?

I didn't see a unit test that call the fundWallet function

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't any

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a follow up PR which sets use_case="integration_test" or use_case="unit_test"?

I didn't see a unit test that call the fundWallet function

No but generate_faucet_wallet is called in places. That should allow for you pass use case.

Copy link
Collaborator

@mvadari mvadari May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user_agent is specific to xrpl.js - use-case is pointing towards things like: workshop, int test, unit tests..

I'm a little confused as to what this means.

Personally I don't think use_case is a very descriptive name and I would have no idea what that meant if I saw it in the docs. Maybe something along the lines of source would be more descriptive.

@ckniffen
Copy link
Collaborator

Should there be a follow up PR which sets use_case="integration_test" or use_case="unit_test"?

@jonathanlei jonathanlei requested a review from mvadari May 16, 2023 21:40
@jonathanlei jonathanlei changed the title add http header for faucet add user agent and use case info to faucet json bodyu May 19, 2023
@jonathanlei jonathanlei changed the title add user agent and use case info to faucet json bodyu add user agent and use case info to faucet json body May 19, 2023
@ckniffen
Copy link
Collaborator

ckniffen commented May 19, 2023

@jonathanlei pinging about adding use_case to generate_faucet_wallet

@justinr1234
Copy link
Collaborator

@jonathanlei conflicts after latest master

@jonathanlei jonathanlei merged commit 1eb0806 into master Jun 13, 2023
12 checks passed
@jonathanlei jonathanlei deleted the faucet-http-header branch June 13, 2023 20:17
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.

None yet

4 participants