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: fix writing prover-id to file and reading it #92

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

dprats
Copy link
Collaborator

@dprats dprats commented Dec 9, 2024

Issue

The CLI wasn't saving autogenerated prover IDs in certain error cases. When reading the prover ID file failed, some error paths didn't properly handle saving the default ID.

Primary changes

  • Refactored get_or_generate_prover_id to handle some missing cases (e.g. hitting an error, missing file, etc...)
  • Since there are a few cases, refactored the function into smaller functions that are used by the particular case (or re-used as appropriater)
  • Simplified error handling to ensure consistent behavior
  • Added test coverage for empty file scenarios

Secondary changes

  • Moved a print statement so Your current prover identifier is shows up in the Setting up CLI configuration. section (see image below). Before this PR, the prover id was logged in same section as the web socket connection. This was misleading.
Screenshot 2024-12-09 at 10 59 12 AM

Copy link

github-actions bot commented Dec 9, 2024

Visit the preview URL for this PR (updated for commit 16b1a65):

https://nexus-cli--pr92-dprats-fix-prover-id-13mv21p2.web.app

(expires Mon, 16 Dec 2024 19:03:59 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 815ec4c632754f56eccfacfc0919559f5a85a0f1

@dprats dprats requested a review from collinjackson December 9, 2024 19:04
@dprats dprats marked this pull request as ready for review December 9, 2024 19:04
@dprats dprats requested a review from stupidmelon December 9, 2024 19:04
@dprats dprats merged commit f50d357 into main Dec 9, 2024
3 checks passed
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