Skip to content

Create a template workflow to execute poetry update #683

@ArBridgeman

Description

@ArBridgeman

Summary

Dependabots has been opening many security issues for our transitive/phantom dependencies. These are not of interest to our customers, & they can update their own poetry.lock in many cases.

Additionally, it may be that the prod/dev/main dependencies have a wide enough range to already allow the non-vulnerable version.

To Dos

Part 1: Workflow Template Creation

Let's create a workflow template in exasol/toolbox/templates/github/workflows/ that:

  • Runs on a weekly schedule (ideally not same day as the project-keeper or use a different Slack channel)
  • Executes poetry update
  • If there are changes to the poetry.lock file:
    • It commits the updated poetry.lock file to a branch
    • Opens a PR to merge that branch to main
    • Communicates the PR to our team channel

Notes:

  • It does more than we need, but the analogous project-keeper workflow might be helpful to reference. It looks like they might have stayed with or switched back to daily runs. We can check with @antonireus. For now, it's ok if we deviate as we're building up this tool.
  • Each project uses the noxconfig.py::PROJECT_CONFIG to define specific values, while it's not been fully thought through for this task, you might need values for that. In that case, our templates use Jinja2 to render variables in them. The default values are defined in github_template_dict.

Part 2: Using the Workflow Template in the PTB

  • Set this up for use in the PTB as an active workflow by using
    poetry run -- tbx workflow install <your-workflow's-short-name>
  • For the Slack credential setup in GitHub, you'll likely need to ask @ckunki (or @ArBridgeman )

Note:

  • <your-workflow's-short-name> is defined here in the code and visible with poetry run -- tbx workflow list.

Part 3: Testing

  • (optional) The PTB workflow would be temporarily modified so it uses a workflow_call to verify that it works via the usual CI pipeline (before we merge it)
  • Might adapt test/integration/tools/workflow_test.py (improvements always welcome 😄)
  • Might adapt test/unit/tools/test_template.py

Part 4: Write Up What Another PTB-based Project Would Need to Do

Notes:

  • rst pages can link to rst & md pages by location references or tags.
  • But md pages usually link to URLs of formatted documentation. Thus, if a new rst page is added, we may end up with a chicken-and-egg issue, as the URL doesn't exist yet. In such case, we adapt the changelog later, like when the release is made.

Metadata

Metadata

Assignees

Labels

featureProduct feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions