Open just-an-engineer opened 3 months ago
Attention: Patch coverage is 32.82443%
with 88 lines
in your changes missing coverage. Please review.
Project coverage is 51.79%. Comparing base (
0cc0c62
) to head (f07dc9b
). Report is 72 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What about configuring it in a configuration file?
Yeah, I can do that. I'll add that as well
Alright, just added that in. Currently, this is the order of precedence in the code of where it looks for the port: CLI, config, env var, and lastly, the hardcoded default port of 4226. No particular reason for that order, so that can be changed up if desired.
@sylvestre, I'm a bit new to the whole process. At this point, do I select "Update branch"? Do I want for someone else to do something?
I realized I hadn't done anything for commands outside of start or stop. So I added in basic functionality for a client cache (which we can expand to other things), and added tests for that. I also corrected a prior test that was incorrect, I just wasn't thinking properly for that one. I also expanded it to test that a compile request works for a server started on a non-default port.
The client cache will also help it be more ergonomic for users because they won't have to specify an environment variable alongside every sccache
command they run, because if they started a server on a different port, they'd have to use the env vars to see its stats, run a compile request, etc. This can make it a bit more streamlined by assuming that you'll have a single compile server you primarily use (if that's not the case, this may break down, but it's not like it was easier beforehand), and once you specify it, that's the one you want to see the stats for, run compile jobs from, and shutdown
It now looks to see if a port number was specified on the command line, and tries to use that before looking at the config file or environment variables Since --start-server calls InternalStartServer under the hood, I have it starting it with the port number specified as the environment variable, although I can change it to also take it from the cli. Added tests and updated the readme for usages