apollographql / rover

The CLI for Apollo GraphOS
https://rover.apollo.dev
Other
409 stars 85 forks source link

bug: crashed while uploading subgraph #2262

Open GeoffreyPS opened 1 week ago

GeoffreyPS commented 1 week ago

Description

We have some members of our team migrating some CI actions from CircleCI to GitHub Actions, and rover crashes reliably when publishing our subgraph when executing in the new GHA environment.

Strangely, it appears to occasionally succeed when we perform the action on preview/staging environments. However, we do encounter this error nearly universally as part of our main CI workflow for merging into our main branch.

Crash Report

name = "rover"
operating_system = "unix:Debian"
crate_version = "0.26.2"
explanation = """
Panic occurred in file 'src/error/metadata/mod.rs' at line 249
"""
cause = "internal error: entered unreachable code: Graph ref parse errors should be caught via clap"
method = "Panic"
backtrace = """

   0: 0x55a16840ed86 - <rover::error::metadata::RoverErrorMetadata as core::convert::From<&mut anyhow::Error>>::from::h0ab8fa148084e064
   1: 0x55a1680d3d19 - rover::command::subgraph::publish::Publish::run::{{closure}}::h09ecec4207f1eb15
   2: 0x55a1680dc5af - rover::command::subgraph::Subgraph::run::{{closure}}::had431d49cee896f6
   3: 0x55a16807d722 - rover::cli::Rover::execute_command::{{closure}}::h787ad948d3f705e7
   4: 0x55a1680e693a - tokio::runtime::park::CachedParkThread::block_on::ha79eae6543ca403a
   5: 0x55a168279b46 - tokio::runtime::context::runtime::enter_runtime::h3280454ed655f90f
   6: 0x55a16836fd17 - tokio::runtime::runtime::Runtime::block_on::h4441c6d65a3de126
   7: 0x55a1682e2de6 - rover::main::ha14038f9fe05381e
   8: 0x55a1682f94e3 - std::sys::backtrace::__rust_begin_short_backtrace::h4c73e07e7764f55f
   9: 0x55a168355bed - std::rt::lang_start::{{closure}}::he13e556c1deee5b8
  10: 0x55a168c55dc0 - std::rt::lang_start_internal::h5e7c81cecd7f0954
  11: 0x55a1682e2f35 - main
  12: 0x7f80dadf5d0a - __libc_start_main
  13: 0x55a167f9a2d0 - <unresolved>
  14:        0x0 - <unresolved>"""

Please let me know if there is any further information you need to debug the issue. Thanks for taking a look.

dylan-apollo commented 1 week ago

It looks like it's upset about the graph ref, which would explain why it works fine for the staging/preview environments—they'd have a different graph ref. Can you double check that the graph ref configured for your main environment is set correctly (assuming somewhere in the GHA config)? This is the argument that looks like name@variant.

If you could provide us that value, it'd help in narrowing down why Rover crashes in this case (instead of providing a helpful error message). Feel free to email that to me at dylan@apollographql.com if you don't want to post it here.

GeoffreyPS commented 1 week ago

Thanks Dylan. I got with the person who was putting together some of the changes and we had a typo in our graph reference name 🤦

Sorry to distract. We're solved on this matter from our end.

GeoffreyPS commented 1 week ago

For reference, the graph name had a $ typo so it was <org_name>@$<variant_name>. Removing the $ put everything back into working order.

dylan-apollo commented 1 week ago

Great, glad you got this sorted! We can keep the issue open, though, since the correct behavior from Rover is to report that typo rather than crashing 😁