Skip to content

Print project link eagerly from credentials file if possible#1393

Merged
alexmojaki merged 9 commits intomainfrom
alex/skip-check-token
Sep 10, 2025
Merged

Print project link eagerly from credentials file if possible#1393
alexmojaki merged 9 commits intomainfrom
alex/skip-check-token

Conversation

@alexmojaki
Copy link
Copy Markdown
Collaborator

@alexmojaki alexmojaki commented Sep 10, 2025

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Sep 10, 2025

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3a4e8e8
Status: ✅  Deploy successful!
Preview URL: https://540bb557.logfire-docs.pages.dev
Branch Preview URL: https://alex-skip-check-token.logfire-docs.pages.dev

View logs

@alexmojaki alexmojaki changed the title WIP Print project link eagerly from credentials file if possible Sep 10, 2025
@linear
Copy link
Copy Markdown

linear bot commented Sep 10, 2025

@alexmojaki alexmojaki marked this pull request as ready for review September 10, 2025 12:33
@alexmojaki alexmojaki requested a review from Copilot September 10, 2025 12:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements eager printing of the Logfire project URL from a credentials file when available, instead of waiting for asynchronous token validation.

  • Modified the configuration logic to attempt loading credentials file first and print project URL immediately if available
  • Updated token precedence to ensure environment variables still take priority over credentials file tokens
  • Added comprehensive test coverage for various credential scenarios including invalid files and token precedence

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
logfire/_internal/config.py Restructured credential loading logic to print project URL eagerly from credentials file when possible
tests/test_configure.py Updated existing tests and added new test cases to verify eager URL printing and token precedence behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@alexmojaki alexmojaki requested review from Kludex and Viicos September 10, 2025 12:34
@alexmojaki alexmojaki enabled auto-merge (squash) September 10, 2025 14:05
@alexmojaki alexmojaki merged commit c0efeb0 into main Sep 10, 2025
14 checks passed
@alexmojaki alexmojaki deleted the alex/skip-check-token branch September 10, 2025 14:08
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.

3 participants