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

optional telemetry #1092

Merged
merged 41 commits into from
Aug 10, 2022
Merged

optional telemetry #1092

merged 41 commits into from
Aug 10, 2022

Conversation

DavidGOrtega
Copy link
Contributor

@DavidGOrtega DavidGOrtega commented Jul 9, 2022

Add optional telemetry to CML to help prioritise features/issues based on usage.

@DavidGOrtega DavidGOrtega temporarily deployed to internal July 9, 2022 16:17 Inactive
@DavidGOrtega DavidGOrtega marked this pull request as draft July 9, 2022 16:17
@DavidGOrtega DavidGOrtega self-assigned this Jul 9, 2022
@DavidGOrtega DavidGOrtega added the enhancement New feature or request label Jul 9, 2022
@0x2b3bfa0

This comment was marked as outdated.

@DavidGOrtega DavidGOrtega temporarily deployed to internal July 10, 2022 10:26 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 10, 2022 10:38 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 10, 2022 10:40 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 10, 2022 10:45 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 10, 2022 11:13 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 10, 2022 14:04 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 11, 2022 10:11 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 12, 2022 13:23 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal July 12, 2022 13:42 Inactive
@DavidGOrtega DavidGOrtega requested a review from a team July 12, 2022 13:42
@DavidGOrtega DavidGOrtega marked this pull request as ready for review July 12, 2022 13:42
@DavidGOrtega DavidGOrtega temporarily deployed to internal August 1, 2022 15:36 Inactive
@casperdcl casperdcl self-requested a review August 2, 2022 17:07
@casperdcl
Copy link
Contributor

(self-requesting review for verifying spec)

Copy link
Contributor

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

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

bin/cml/tensorboard-dev.test.js Outdated Show resolved Hide resolved
src/analytics.js Outdated Show resolved Hide resolved
@casperdcl casperdcl changed the title Telemetry optional telemetry Aug 4, 2022
@DavidGOrtega DavidGOrtega temporarily deployed to internal August 4, 2022 15:13 Inactive
@0x2b3bfa0 0x2b3bfa0 requested review from 0x2b3bfa0, casperdcl and dacbd and removed request for 0x2b3bfa0 and dacbd August 4, 2022 15:50
@dacbd dacbd self-requested a review August 5, 2022 17:20
dacbd
dacbd previously approved these changes Aug 5, 2022
@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Aug 5, 2022

Still trying to figure out how to avoid injecting telemetry-specific code in every command. What if we wrap the entry point on bin/cml.js with some kind of “success” logic?

cml/bin/cml.js

Lines 96 to 115 in 6271cb8

yargs
.env('CML')
.options({
log: {
type: 'string',
description: 'Maximum log level',
choices: ['error', 'warn', 'info', 'debug'],
default: 'info'
}
})
.fail(handleError)
.middleware(setupOpts)
.middleware(setupLogger)
.middleware(setupTelemetry)
.commandDir('./cml', { exclude: /\.test\.js$/ })
.command('$0 <command>', false, (builder) => builder.strict(false), runPlugin)
.recommendCommands()
.demandCommand()
.strict()
.parse();

E.g. yargs...fail(handleError).parse() can be replaced with handleSuccess(yargs...fail(handleError).parse()) and, provided that handleError contains a process.exit they'll be mutually exclusive.

Update: see #1124 (comment) for the proposed changes.

0x2b3bfa0
0x2b3bfa0 previously approved these changes Aug 9, 2022
Copy link
Member

@0x2b3bfa0 0x2b3bfa0 left a comment

Choose a reason for hiding this comment

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

Can probably be merged without applying #1124 first. Worth walking the plank, though. Yargs!

@DavidGOrtega DavidGOrtega dismissed stale reviews from 0x2b3bfa0 and dacbd via a7944f8 August 10, 2022 10:56
@DavidGOrtega DavidGOrtega temporarily deployed to internal August 10, 2022 10:56 Inactive
@DavidGOrtega DavidGOrtega temporarily deployed to internal August 10, 2022 14:59 Inactive
Copy link
Contributor

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

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

lgtm

@DavidGOrtega
Copy link
Contributor Author

lgtm

But not approved 🙈

Copy link
Member

@0x2b3bfa0 0x2b3bfa0 left a comment

Choose a reason for hiding this comment

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

Looks mergeable enough to me

@DavidGOrtega DavidGOrtega temporarily deployed to internal August 10, 2022 16:20 Inactive
@DavidGOrtega DavidGOrtega merged commit 7973d0e into master Aug 10, 2022
@DavidGOrtega DavidGOrtega deleted the telemetry branch August 10, 2022 16:53
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.

CML entrypoint improvements
4 participants