-
Notifications
You must be signed in to change notification settings - Fork 1k
Make emulator hub locator path more robust to environment changes #8604
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this file get cleaned up after you kill the emulator? If not, I'm worried that all subsequent runs will see a running emualtor
Just tested it and it does cleanup, works same exact way as the previous one worked. |
The Not something that consumes a lot of resource, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(offline discussion)
This one looks risky
Can you take a look at this small but risky change? It sounds like some MCP client sets the |
const dir = os.tmpdir(); | ||
const filename = `hub-${projectId}.json`; | ||
return path.join(dir, filename); | ||
return path.join(os.homedir(), ".cache", "firebase", `hub-${projectId}.json`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the parent directories do not exist? Can we find some existing code in the rest of the CLI code base that creates the parents and reuse the logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this is why the integration tests are failing btw - the runner does not have this directory
Description
Some clients couldn't discover emulator due to tempdir path being different depending the client, by using ~/.cache/firebase we should have more robust path.
Scenarios Tested
Running dataconnect emulator
Running dataconnect MCP and communicating with emulator from previously failing client (RooCode)
Sample Commands