Part of the trickiness of doing this with a PR is that two repositories are involved.
This is pretty routine actually. Dev guide coming soon in https://github.com/jenkins-infra/jenkins.io/pull/3343 but https://github.com/jenkinsci/incrementals-tools has some more technical docs already.
there isn't a more basic problem with changing CoreStep to require envvars while it did not before
Not that I can think of offhand. But that is why you file the PRs—to see if CI says there are test failures you did not anticipate!
Introducing CoreStepWithEnv is technically possible but sounds like a mess from a user perspective, and might not interoperate with some plugins which analyze the build graph. I would definitely recommend some approach that involves updating the existing CoreStep.
That said, there is absolutely nothing wrong with filing alternative PRs and letting reviewers compare the impact, so long as you make the situation very clear in the PR description. (Remember to refer to one PR from another by pasting in a naked URL, not a Markdown link, so that GitHub displays a hover tip and more importantly creates an automatic backlink.) Also recommended:
- assign Jira to yourself, mark In Progress while working and In Review when you believe you have something ready to merge (not counting draft status due to an incremental version in a dependency—up to repository maintainers to deal with that)
- link to Jira from each PR (we do not currently have a bot to do this, shame on us)
- link to PRs from Jira (ditto)