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

[ROVER-301] Fixes => rover dev prematurely outputs that the supergraph is running. #2379

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

monkpow
Copy link
Collaborator

@monkpow monkpow commented Jan 31, 2025

This PR makes 2 changes (and a trivial 3rd change) related to messaging the user as a router (attempts) to start up.

  1. We were telling the user that their supergraph was running when we had only told router to start (and the router could fail to start or fail to host the supergraph after this line). This line has been changed to indicate we're starting the router up.
  2. Instead of swallowing all the info messages from the router, I'm allowing messages that show the router has started to be emitted to stderr.
  3. (trivial) I've moved the warning to not use this in production to the top of the logged output.

When the router starts up as expected, the user will see:

...
==> Watching router-config-dev.yaml for changes
==> Attempting to start router at http://localhost:4090.
INFO: Health check exposed at http://127.0.0.1:8088/health
INFO: GraphQL endpoint exposed at http://127.0.0.1:4090/ 🚀

when the router starts and the config file has an error, the user will see:

...
==> Watching router-config-dev-bad.yaml for changes
==> Attempting to start router at http://localhost:4000.
WARN: configuration could not be upgraded automatically as it had errors
ERROR: Failed to read configuration: configuration had errors: 
1. at line 3

  telemetry:
    instrumentation:
      spans: null
             ^----- null is not of type "object"

2. at line 6

    instrumentation:
      spans: null
  headers:
    all:
      request: null
               ^----- null is not of type "array"


ERROR: no valid configuration was supplied
ERROR: no valid configuration was supplied

and when the user fixes the config file, they will see:

...
==> Router config updated.
debug: supergraph:
  listen: 127.0.0.1:4090
telemetry:
  instrumentation:
    spans:
      mode: spec_compliant
headers:
  all:
    request:
    - propagate:
        matching: .*

@monkpow monkpow requested a review from a team as a code owner January 31, 2025 23:10
@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Jan 31, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: c8e8bbdb2178886da76ef90d

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