Folks using `[python-repos]` for private indexes: ...
# general
h
Folks using
[python-repos]
for private indexes: would you find it useful to let you scope this to specific resolves/lockfiles? For example, your user lockfile needs to use your custom index, but the Black tool lockfile is fine w/ just PyPI
Adding custom indexes tends to slow down lockfile generation, so maybe it's useful to keep it as limited as possible?
e
Is that true? Adding, yes, but IIUC most people replace. I.E. lock down. In that case it should be faster! since the custom index is presumably on a local fast network.
👍 1
h
True, I only meant adding.
If you indeed are 100% using custom index, then this idea is a bad one because it results in more boilerplate
f
Our custom repo is somewhat problematic, so ability to namespace it and only reference it when needed would probably be a win
👍 1
h
then this idea is a bad one because it results in more boilerplate
We could add some workaround, like use the value
<all>
to avoid having to enumerate each resolve
Thanks @freezing-vegetable-92896 for the feedback! This helped prompt a new design doc: https://docs.google.com/document/d/1HAvpSNvNAHreFfvTAXavZGka-A3WWvPuH0sMjGUCo48/edit Feedback welcomed
@freezing-vegetable-92896 could you please share more about why it's problematic having your custom repo, and why it would be helpful to have per-resolve config?
f
Sorry I didn't get to responding to this for a while
h
Hi! No worries. This is the relevant thread: https://pantsbuild.slack.com/archives/C0D7TNJHL/p1660577710953089
f
The biggest issue might have been me messing up other things, but we would run into a pattern where a failure to find some <public pypy package> in our private artifactory would lead to an error of a form that would cause the entire resolution to fail
👍 1
it has mostly gone away now, not sure if it was me fixing other config issues or a newer pants version being more robust to the kind of error that was generated there
h
How are you using your private index? For example, is it being used for any custom tool lockfiles, like
[pytest].lockfile
? Or only for
[python].resolves
?
f
we are only using it for [python].resolves at the moment
👍 1
though there is enough noise around moving to locally hosted dependencies that I wouldn't be suprised to see us use it for things like pytest at some point in the future
👍 1
I also don't have anything concrete, but I have a vague sense that our artifactory is sometimes substantially slower than hitting public pypi
not all the time, more one of those intermittent annoying things where it happens just often enough to be maybe noticeable but not enough prioritize actually digging into
👍 1
I'm only partially comprehending the design doc on quick read and don't have time to dig in in detail now
h
tl;dr: you can set it so only certain resolves from
[python].resolves
and from tools like Pytest use certain
find-links
or indexes. You can also use
__default__
if want them using the same thing
f
Ok. Not sure that specifically would make a big difference for us, I don't think we've had much issue with our custom repo and tools
👍 1
It looks like it could me a good proposal for the other reasons you propose, but I don't have any concrete problems it would solve for us
h
Sg, thanks for the feedback!
f
You are welcome. Thanks for all your work on pants!
❤️ 1