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

Ane 904 preflight check #136

Merged
merged 7 commits into from
Oct 4, 2023
Merged

Ane 904 preflight check #136

merged 7 commits into from
Oct 4, 2023

Conversation

JeffreyHuynh1
Copy link
Contributor

@JeffreyHuynh1 JeffreyHuynh1 commented Oct 2, 2023

Overview

Broker currently has pretty good diagnostics through tracing and error messages, and we’re working on user-facing diagnostics through broker fix. However, all these diagnostics are confusing to users if they see something like “failed to upload scan” sometime after startup, instead of a more specific “Broker couldn’t reach FOSSA” at startup.

In order to catch obvious network misconfiguration early, we should add preflight checks to broker run. Most likely this is using the work implemented for broker fix, but with less output to the user unless there is an issue.

Acceptance criteria

When broker run is executed and after config values are parsed, Broker runs preflight checks.

These checks:

Validate that Broker can reach FOSSA using POST requests.

Validate that Broker can reach at least one integration.

Output detailed diagnostics for users explaining issues discovered during preflight checks.

Testing plan

  • Manual test bad integration, broker fails
  • Manual test bad fossa key, broker fails

Risks

  • Added a guard to set FOSSA_API_KEY env variable for integration tests

References

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).

@JeffreyHuynh1 JeffreyHuynh1 requested a review from a team as a code owner October 2, 2023 19:01
@JeffreyHuynh1 JeffreyHuynh1 requested a review from csasarak October 2, 2023 19:01
src/cmd/run.rs Outdated Show resolved Hide resolved
src/cmd/run.rs Outdated Show resolved Hide resolved
src/cmd/run.rs Outdated Show resolved Hide resolved
@JeffreyHuynh1 JeffreyHuynh1 requested a review from csasarak October 3, 2023 23:06
@JeffreyHuynh1 JeffreyHuynh1 merged commit 4570ad1 into main Oct 4, 2023
12 checks passed
@JeffreyHuynh1 JeffreyHuynh1 deleted the ANE-904-Preflight-Check branch October 4, 2023 16:44
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.

2 participants