Skip to content
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

Copy dependency on st2-auth-backend-pam from st2-packages.git #6306

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Feb 26, 2025

st2-packages.git has been injecting another dependency since 2016 (StackStorm/st2-packages@d35c03e):

git+https://github.com/StackStorm/st2-auth-backend-pam.git@master#egg=st2-auth-backend-pam

https://github.com/StackStorm/st2-packages/blob/7ed6bf12d101aa34456b711723be9f81d3be82d7/packages/st2/in-requirements.txt#L8

The legacy Makefile gets the dep indirectly via st2-packages.git, but that will be archived when we start using pants to build packages. So, this PR copies that requirement into pants-requirements.txt here (and to st2auth/in-requirements.txt):

st2-auth-backend-pam @ git+https://github.com/StackStorm/st2-auth-backend-pam.git@master

Then, since pants can't infer a dep on plugins like this, we explicitly add the dep here:

st2/BUILD

Lines 63 to 68 in f350445

target(
name="auth_backends",
dependencies=[
"//:reqs#st2-auth-backend-flat-file",
"//:reqs#st2-auth-ldap",
"//:reqs#st2-auth-backend-pam",

Finally, I regenerated lockfiles/st2.lock and copied the updated pins to the legacy requirements files. Here's the lockfile diff:

Lockfile diff: lockfiles/st2.lock [st2]

==                    Upgraded dependencies                     ==

  decorator                      5.1.1        -->   5.2.1
  psutil                         6.1.1        -->   7.0.0
  simplejson                     3.19.3       -->   3.20.1

==                      Added dependencies                      ==

  st2-auth-backend-pam           0.4.0

NB: The psutil major version bump merely drops support for python 2.7 and a deprecated method that we do not use.

@cognifloyd cognifloyd added this to the pants milestone Feb 26, 2025
@cognifloyd cognifloyd self-assigned this Feb 26, 2025
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines. Requires some effort to review. label Feb 26, 2025
Lockfile diff: lockfiles/st2.lock [st2]

==                    Upgraded dependencies                     ==

  decorator                      5.1.1        -->   5.2.1
  psutil                         6.1.1        -->   7.0.0
  simplejson                     3.19.3       -->   3.20.1

==                      Added dependencies                      ==

  st2-auth-backend-pam           0.4.0
@nzlosh
Copy link
Contributor

nzlosh commented Feb 26, 2025

Looks like the sample file needs to be regenerated for linting to pass. Please run "make configgen" and include and commit the generated file.

@cognifloyd
Copy link
Member Author

I'm going to have to add this to the legacy requirements as well.

@cognifloyd cognifloyd enabled auto-merge February 27, 2025 03:20
@nzlosh
Copy link
Contributor

nzlosh commented Feb 27, 2025

Good find by the way 💯

@cognifloyd cognifloyd requested a review from a team February 27, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:st2auth external dependency pantsbuild size/L PR that changes 100-499 lines. Requires some effort to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants