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

Preflight Checks: Implement event tracking #307

Merged
merged 4 commits into from
Apr 26, 2022

Conversation

vaurdan
Copy link
Member

@vaurdan vaurdan commented Apr 22, 2022

Description

In order to measure usage of the Preflight Checks, this PR implements Tracks to track analytics on the executed tests, using the event vip_preflight_checks_finish.

This implementation is very simplistic, and it's forked from the VIP CLI. It sends the following parameters with the event:

  • cli_version - version of the Preflight Checks CLI
  • node_version - version of Node.js used to execute the CLI
  • os_name - Operating System
  • os_version - Operating system version/kernel version
  • port - Selected (or randomly generated) port used for the checks
  • selected_node_version - Node.js version selected to run the checks
  • verbose - true, if running in verbose mode
  • wait - selected wait time
  • is_success/is_failed/is_warning - boolean value that flag if checks succeeded, if there are any warnings, or if failed.

Steps to Test

  1. Check out PR.
  2. Run npm run build.
  3. cd to a VIP Go node site repository
  4. Run node [path-to-vip-go-node-repo]/preflight-checks/dist/index.js
  5. The tool should execute normally without any errors.

@@ -31,7 +31,7 @@
"command-line-usage": "^6.1.1",
"enquirer": "^2.3.6",
"execa": "^4.0.0",
"node-fetch": "^3.1.1",
"node-fetch": "^2.6.7",
Copy link
Member Author

@vaurdan vaurdan Apr 22, 2022

Choose a reason for hiding this comment

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

Had to rollback node-fetch to the latest version of the previous major version (2) due to incompatibility with ES modules.

/**
* External dependencies
*/
import fetch from 'node-fetch';
Copy link
Member

Choose a reason for hiding this comment

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

probably a good candidate for vip-go-node-internal once we figure it out as a package

@vaurdan vaurdan merged commit 361ea7b into trunk Apr 26, 2022
@vaurdan vaurdan deleted the add/preflight-checks-tracks branch April 26, 2022 09:06
@vaurdan vaurdan mentioned this pull request Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants