Spec discussion: Updating or freezing pip URL when running lock --update
#6445
aaronsteers
announced in
Spec Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are approximately four ways we can pin a
pip_url
ref.Pip pin methods
1.A. Default branch pin
This is a pin to the repo itself. Whatever the default branch is, that branch's latest commit will be used during installation.
1.B. Pin to a named branch
The named branch would be used instead of the default branch. (Otherwise same as "1.A".)
1.C. Pin to a release tag
Syntactically this is identical to "1.B", except that the pinned ref should fit the pattern for a semvar identifier.
1.D. Pin to a commit ref
Syntactically this is identical to "1.B", except that the pinned ref should fit the pattern for a SHA hash or partial SHA hash.
2.A. Pin to a PyPi library name
A bare library name (without
/
or/http(s)
refs) is likely a PyPi library name.2.B. Pin to a specific PyPi library version
Similar to "2.A" but with an "==" version constraint.
Challenges
pip_url
string can actually reference many libraries (space delimited), and these libraries may each have different bump strategies.Applications
There are two applications for this functionality:
Locally: The user may want to run a version of
meltano lock
likemeltano lock --update=pip_url
which gets the latest pip url bump.In hub.meltano.com: In an automated fashion, we may want to "bump and lock" all pip urls within the current yaml definition files. This would ensure that when users install or add a plugin, they are getting references that would be stable from a pip/python perspective, as well as from a meltano definition perspective.
EDIT: Separate of 'freeze' and 'update' behaviors
After logging the above, I realized that another approach would be to create distinct actions to 'freeze' the Pip URL (which takes a slippery ref and replaces it with a pinned one, versus the action to 'update' the ref, which tries to advance the ref using one or more promotion strategies.
It might be more feasible to first 'freeze' the existing volatile refs, by checking the slippery ref and comparing it with an equivalent pinned ref, replacing the pinned ref if the two are identical. Then, separately, we could handle bumps manually or in a semi-automated manner according to a few specific known patterns and/or according to maintainer requests.
A pragmatic approach
Beta Was this translation helpful? Give feedback.
All reactions