Skip to content

Allow inline migration scripts#11

Merged
llucax merged 1 commit into
frequenz-floss:v1.x.xfrom
llucax:internal-script
Mar 27, 2026
Merged

Allow inline migration scripts#11
llucax merged 1 commit into
frequenz-floss:v1.x.xfrom
llucax:internal-script

Conversation

@llucax
Copy link
Copy Markdown
Contributor

@llucax llucax commented Mar 5, 2026

Support embedding the migration script in the workflow YAML via the migration-script input, as an alternative to fetching it from script-url-template. This reduces setup overhead for small, trusted migrations while keeping the existing pull_request_target safety model.

Inline scripts are written to a temporary file and executed with python3 -I once per version. The target is provided as MIGRATION_VERSION in both inline and URL modes, and only the migration-token input is exposed as GitHub credentials.

This allows creating simple migration workflows for formatting and linting tools with auto-fix features, like black or isort.

Support embedding the migration script in the workflow YAML via the
`migration-script` input, as an alternative to fetching it from
`script-url-template`. This reduces setup overhead for small, trusted
migrations while keeping the existing `pull_request_target` safety
model.

Inline scripts are written to a temporary file and executed with
`python3 -I` once per version. The target is provided as
`MIGRATION_VERSION` in both inline and URL modes, and only the
`migration-token` input is exposed as GitHub credentials.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
@llucax llucax requested a review from a team as a code owner March 5, 2026 10:13
@llucax llucax requested review from tiyash-basu-frequenz and removed request for a team March 5, 2026 10:13
@llucax llucax added this to the v1.1.0 milestone Mar 5, 2026
@llucax llucax requested a review from Marenz March 5, 2026 10:14
@llucax llucax self-assigned this Mar 5, 2026
@llucax llucax added the type:enhancement New feature or enhancement visitble to users label Mar 5, 2026
@llucax llucax enabled auto-merge March 5, 2026 10:15
@llucax
Copy link
Copy Markdown
Contributor Author

llucax commented Mar 27, 2026

@llucax
Copy link
Copy Markdown
Contributor Author

llucax commented Mar 27, 2026

Will force-merge to unlock:

We can address any issue in a follow-up PR.

@llucax llucax disabled auto-merge March 27, 2026 15:51
@llucax llucax merged commit b389f72 into frequenz-floss:v1.x.x Mar 27, 2026
7 checks passed
@llucax llucax deleted the internal-script branch March 27, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement New feature or enhancement visitble to users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant