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

fix: Error if the check workflow fails but all known tasks succeed #1280

Merged
merged 4 commits into from
Sep 2, 2022

Conversation

sachindshinde
Copy link
Contributor

@sachindshinde sachindshinde commented Aug 31, 2022

Rover currently only fails a check if the tasks it knows about haven't errored. This causes issues when Studio introduces new tasks, as old versions of Rover will mistakenly think a check succeeded when it failed.

This PR:

  • Introduces a new error variant (RoverClientError::OtherCheckTaskFailure) and code (E036) to convey when this occurs.
  • Updates CheckResponse::try_new() to return this error when the operations check succeeds, but the check workflow has not.

If you'd like to test this out, please ping me on Slack (as the new task that would elicit this error is currently feature-flagged in Studio).

@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented Aug 31, 2022

note from our call: let's update the error message to say "Composition checks and operation checks succeeded, but other check tasks failed." and leave the suggestion pretty much exactly how it is.

@sachindshinde sachindshinde force-pushed the sachin/fix-unknown-check-error branch from cdcbf5c to 0cfde96 Compare August 31, 2022 20:38
@sachindshinde sachindshinde force-pushed the sachin/fix-unknown-check-error branch from 0cfde96 to 1829cda Compare August 31, 2022 20:40
@sachindshinde
Copy link
Contributor Author

@EverlastingBugstopper

"Composition checks and operation checks succeeded, but other check tasks failed."

Would request two slight wording changes if they look fine:

  1. I think in the frontend/Studio we're trying to label composition as a kind of "build" (it's labeled that in front-end at least), so we may want to change "composition" to "build".
  2. Folks often confuse a "check" and a "task" run by a check, so we may want to call them build/operations "tasks" instead of "checks".

Copy link
Contributor

@EverlastingBugstopper EverlastingBugstopper left a comment

Choose a reason for hiding this comment

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

lgtm! i suggested adding The to the beginning of the error messages and then I think we're ready to rumble

ChangeSeverity::FAIL => Err(RoverClientError::OtherCheckTaskFailure {
has_build_task,
target_url: check_response.target_url.unwrap_or_else(||
// Note that graph IDs and variants don't need percent-encoding due to their regex restrictions.
Copy link
Contributor

Choose a reason for hiding this comment

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

you love to see it

@sachindshinde sachindshinde merged commit c9869e7 into main Sep 2, 2022
@sachindshinde sachindshinde deleted the sachin/fix-unknown-check-error branch September 2, 2022 00:20
@EverlastingBugstopper EverlastingBugstopper added this to the vNext milestone Sep 6, 2022
@EverlastingBugstopper EverlastingBugstopper added the feature 🎉 new commands, flags, functionality, and improved error messages label Sep 6, 2022
EverlastingBugstopper added a commit that referenced this pull request Sep 6, 2022
# [0.8.2] - 2022-09-06

## 🚀 Features

- **Check commands exit with failure when downstream tasks fail - @sachindshinde, #1280**

  Historically, `rover graph check` and `rover subgraph check` have aggregated errors for operation checks and/or composition checks. Checks are expanding in Studio and will continue to expand over time, starting with downstream contract checks for `rover subgraph check`. When these tasks fail, Rover will throw an error and link to the checks page in Studio which will contiain more information on the exact failure.

- **Detect improper VS Code API key pastes on Windows - @EverlastingBugstopper, #1026, 1268**

  We have added new error messages and recovery suggestions for malformed API keys caused by invalid copy+pastes in VS Code on Windows.

- **Adds `--watch` to `introspect` commands - @EverlastingBugstopper, #1207**

  If you pass the `--watch` flag to `rover graph introspect` or `rover subgraph introspect`, the GraphQL server will be introspected once every second, printing updates to the terminal as the introspection response changes. This could be used to bootstrap development workflows when combined with `--output json` and a tool like `jq`.

## 🐛 Fixes

- **Trim double quotes in multilingual descriptions - @lrlna, #1245 fixes #1244 and #1114**

  `rover graph introspect` no longer crashes if a field description contains cyrillic symbols.

- **Fix link to ELv2 license information - @EverlastingBugstopper, #1262 fixes #1261**

## 🛠 Maintenance

- **Link directly to API Keys page in Studio - @abernix, #1202**

  The `rover config auth` command will now provide a link that takes you directly to the "API Keys" page where you can create a Personal API Key, rather than a page that requires you to click through to another page.

- **Skip Apollo Studio integration tests for fork PRs - @EverlastingBugstopper, #Issue #, 1216**

  Our CI pipeline skips Apollo Studio integration tests for forked repositories because they don't have access to the Apollo Studio organization that we use to run them.

- **Updates MacOS CI pipeline to use xcode 13.4 - @EverlastingBugstopper, #1211**

- **Normalize git remote URLs for anonymized telemetry - @EverlastingBugstopper, #1279**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎉 new commands, flags, functionality, and improved error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants