apollographql / rover

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

bug: crashed while trying to publish subgraph #1834

Open renanpupin opened 8 months ago

renanpupin commented 8 months ago

Description

Hover crashes when trying to publish a new subgraph

Captura de Tela 2024-02-02 às 13 01 42

Crash Report

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

   0: 0x55653e863f93 - <rover::error::metadata::RoverErrorMetadata as core::convert::From<&mut anyhow::Error>>::from::hb33f57fc77a95922
   1: 0x55653e7cdd41 - rover::command::subgraph::publish::Publish::run::h6fa4b5d4f6b20a35
   2: 0x55653e6d3aa7 - rover::command::subgraph::Subgraph::run::h6752c92548dfd073
   3: 0x55653e6ce3d0 - rover::cli::Rover::execute_command::hf6c877d9de6d2499
   4: 0x55653e6cc52d - rover::cli::Rover::run::h6b98ad4cc796c852
   5: 0x55653e6cbcd9 - rover::cli::Rover::run_from_args::h5aeb137325e3b396
   6: 0x55653e6c4367 - rover::main::h4b8ed56c64afe0b5
   7: 0x55653e6c3cb3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h49f7720a21d8cefe
   8: 0x55653e6c3cd3 - std::rt::lang_start::{{closure}}::hf80a07f113eca9b8
   9: 0x55653f1f72eb - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hbcc4f8a3f5ada78c
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:284
                 - std::panicking::try::do_call::he5f117a9e13dadde
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502
                 - std::panicking::try::h2f3af9afce3a0443
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466
                 - std::panic::catch_unwind::h6d6c387f38ef05ea
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142
                 - std::rt::lang_start_internal::{{closure}}::h6ca09d5905711415
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/rt.rs:148
                 - std::panicking::try::do_call::ha9fd18ea06654a4b
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:502
                 - std::panicking::try::hda5c2a4432362341
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:466
                 - std::panic::catch_unwind::h440f731b142bc235
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panic.rs:142
                 - std::rt::lang_start_internal::hc0b4e50f058f62ce
                at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/rt.rs:148
  10: 0x55653e6c47f5 - main
  11: 0x7f7a1cf1ad90 - <unresolved>
  12: 0x7f7a1cf1ae40 - __libc_start_main
  13: 0x55653e6c3bb2 - <unresolved>
  14:        0x0 - <unresolved>"""
dylan-apollo commented 5 months ago

At a glance, the issue appears to be that the environment variable was not defined. We need to turn this into a readable error instead of a crash, though.