Skip to content

Conversation

@cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Apr 10, 2025

This PR is working towards doing packaging via pantsbuild. Eventually, I hope to archive and stop using st2-packages.git.

This PR does 3 things:

  • add a crudini pex_binary target meant to be used when packaging deb/rpm with pants.
  • regenerate lockfiles/st2.lock to include crudini (it has to be in the st2 resolve because this is a transitive dep of the deb/rpm package targets).
  • copy locked versions of updated packages from lockfiles/st2.lock to the legacy requirements files.

In a follow-up PR (#6330 is a draft), I will add some shell_command targets that modify the in-repo conf files during packaging. Currently st2-packages does this with sed, but it uses features that are only available in gnu sed, making it not very portable. Anyone that tried to run the sed commands on Mac--which would probably only happen during local development--the sed commands would fail. Crudini, on the other hand, is very portable and system agnostic. Plus, st2-packages.git uses crudini for several other things. So, crudini seems like a good way to edit the conf files on the fly without the portability concerns.

crudini will not end up in the final st2 venv because we don't transitively depend on it from our code. We can explicitly include it later if that is helpful.

Crudini links:

Lockfile diff: lockfiles/st2.lock [st2]

==                    Upgraded dependencies                     ==

  argcomplete                    3.5.3        -->   3.6.2
  attrs                          25.1.0       -->   25.3.0
  bcrypt                         4.2.1        -->   4.3.0
  eventlet                       0.39.0       -->   0.39.1
  iniconfig                      2.0.0        -->   2.1.0
  jinja2                         3.1.5        -->   3.1.6
  kombu                          5.4.2        -->   5.5.2
  mock                           5.1.0        -->   5.2.0
  pyasn1-modules                 0.4.1        -->   0.4.2
  python-json-logger             3.2.1        -->   3.3.0
  pytz                           2025.1       -->   2025.2
  setuptools                     75.3.0       -->   75.3.2
  tzdata                         2025.1       -->   2025.2
  virtualenv                     20.29.2      -->   20.30.0

==                      Added dependencies                      ==

  crudini                        0.9.5
  iniparse                       0.5
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines. Requires some effort to review. label Apr 10, 2025
@cognifloyd cognifloyd self-assigned this Apr 10, 2025
@cognifloyd cognifloyd added enhancement st2-packages external dependency size/L PR that changes 100-499 lines. Requires some effort to review. and removed size/L PR that changes 100-499 lines. Requires some effort to review. labels Apr 10, 2025
@cognifloyd cognifloyd added this to the pants milestone Apr 10, 2025
@cognifloyd cognifloyd requested a review from a team April 11, 2025 13:09
@guzzijones guzzijones merged commit c9d9e30 into master Apr 13, 2025
118 of 122 checks passed
@guzzijones guzzijones deleted the crudini branch April 13, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement external dependency size/L PR that changes 100-499 lines. Requires some effort to review. st2-packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants