https://pantsbuild.org/ logo
#general
Title
# general
h

hundreds-father-404

08/08/2022, 6:02 PM
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

enough-analyst-54434

08/08/2022, 6:09 PM
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

hundreds-father-404

08/08/2022, 6:09 PM
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

freezing-vegetable-92896

08/08/2022, 6:21 PM
Our custom repo is somewhat problematic, so ability to namespace it and only reference it when needed would probably be a win
👍 1
h

hundreds-father-404

08/08/2022, 6:24 PM
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

freezing-vegetable-92896

08/15/2022, 9:41 PM
Sorry I didn't get to responding to this for a while
h

hundreds-father-404

08/15/2022, 9:42 PM
Hi! No worries. This is the relevant thread: https://pantsbuild.slack.com/archives/C0D7TNJHL/p1660577710953089
f

freezing-vegetable-92896

08/15/2022, 9:43 PM
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

hundreds-father-404

08/15/2022, 9:44 PM
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

freezing-vegetable-92896

08/15/2022, 9:44 PM
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

hundreds-father-404

08/15/2022, 9:52 PM
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

freezing-vegetable-92896

08/15/2022, 9:53 PM
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

hundreds-father-404

08/15/2022, 9:54 PM
Sg, thanks for the feedback!
f

freezing-vegetable-92896

08/15/2022, 9:55 PM
You are welcome. Thanks for all your work on pants!
❤️ 1
3 Views