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

send preflight results event when preflights fail #1553

Merged
merged 11 commits into from
Dec 5, 2024

Conversation

laverya
Copy link
Member

@laverya laverya commented Nov 26, 2024

What this PR does / why we need it:

When a preflight fails/warns, send a copy of the preflight results to our metrics endpoint.

Which issue(s) this PR fixes:

Does this PR require a test?

Does this PR require a release note?


Does this PR require documentation?

Copy link

github-actions bot commented Nov 26, 2024

This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app license ID.

Online Installer:

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/appver-dev-21e3e42" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Airgap Installer (may take a few minutes before the airgap bundle is built):

curl "https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci-airgap/appver-dev-21e3e42?airgap=true" -H "Authorization: $EC_SMOKE_TEST_LICENSE_ID" -o embedded-cluster-smoke-test-staging-app-ci.tgz

Happy debugging!

@laverya laverya changed the title send preflight results event when failed preflights are bypassed send preflight results event when preflights fail Nov 27, 2024
}

func runHostPreflights(cmd *cobra.Command, hpf *v1beta2.HostPreflightSpec, proxy *ecv1beta1.ProxySpec, assumeYes bool) error {
func runHostPreflights(cmd *cobra.Command, hpf *v1beta2.HostPreflightSpec, proxy *ecv1beta1.ProxySpec, assumeYes bool, replicatedAPIURL string) error {
Copy link
Member

@emosbaugh emosbaugh Dec 3, 2024

Choose a reason for hiding this comment

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

since this function is called from many different commands, wouldn't it be helpful to report which command was run? also, is it your intention to report for the run-preflights commands? and not related to this change, but why prompt at all for those commands?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated the reporting to include the command that was called (install, run-preflights, join etc)

Copy link
Member Author

Choose a reason for hiding this comment

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

and not related to this change, but why prompt at all for those commands?

Because it's the same codepath, but we hide the 'skip-host-preflights' and 'ignore-host-preflight' flags on those commands, so there shouldn't be prompts (the code we're using expects the flags to exist, which is why they're there at all)

also add ignore-host-preflights and skip-host-preflights to join/run-preflights
@laverya laverya enabled auto-merge (squash) December 5, 2024 00:21
@laverya laverya merged commit ec5d537 into main Dec 5, 2024
65 checks passed
@laverya laverya deleted the laverya/sc-115699/report-skipped-preflight-failures branch December 5, 2024 00:37
sgalsaleh added a commit that referenced this pull request Dec 5, 2024
* send preflight results event when preflights fail (#1553)

* send preflight results event when failed preflights are bypassed

* send preflight failure events whether or not they are bypassed

* ?

* send json, not go object

* better handle 'no baseurl' case

* report the entry command (install, run-preflights, etc) along with preflight failure results

* mark ignore-host-preflights as hidden in install/run-preflights

also add ignore-host-preflights and skip-host-preflights to join/run-preflights

* Run host preflights as part of the install2 command

* break cycle dep

* add exclude_graphdriver_btrfs tag

---------

Co-authored-by: Andrew Lavery <[email protected]>
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