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

feat: added new fields to usage data #6911

Merged

Conversation

ammarkarachi
Copy link
Contributor

@ammarkarachi ammarkarachi commented Mar 19, 2021

Issue #, if available:

Description of changes:
Added additional fields to the usage data payload.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ammarkarachi ammarkarachi requested a review from a team as a code owner March 19, 2021 00:32
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM with some optional nits.

packages/amplify-cli/src/context-manager.ts Outdated Show resolved Hide resolved
packages/amplify-cli/src/context-manager.ts Outdated Show resolved Hide resolved
packages/amplify-cli/src/context-manager.ts Outdated Show resolved Hide resolved
packages/amplify-cli/src/context-manager.ts Outdated Show resolved Hide resolved
@ammarkarachi ammarkarachi force-pushed the feat/usage-data-addition-fields branch from db5cd97 to 221a8bd Compare March 29, 2021 22:11
Copy link
Contributor

@edwardfoyle edwardfoyle left a comment

Choose a reason for hiding this comment

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

left a few nits and some other clarifying questions

packages/amplify-cli/src/__tests__/context-manager.test.ts Outdated Show resolved Hide resolved
this.version = version;
this.inputOptions = input.options ? _.pick(input.options as InputOptions, ['sandboxId']) : {};
Copy link
Contributor

Choose a reason for hiding this comment

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

is this only storing the sandboxId? if so, I'd just name it that. Also, does this simplify to:

Suggested change
this.inputOptions = input.options ? _.pick(input.options as InputOptions, ['sandboxId']) : {};
this.inputOptions = input?.options?.sandboxId || {};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No we are going to extend this in the future, this is there to add more field if needed in the future

@jhockett jhockett changed the title Feat/usage data addition fields feat: added new fields to usage data Apr 9, 2021
@jhockett jhockett merged commit dc1d256 into aws-amplify:master Apr 9, 2021
@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Apr 14, 2021
@github-actions
Copy link

👋 Hi, this pull request was referenced in the v4.48.0 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v4.48.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
referenced-in-release Issues referenced in a published release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants