Skip to content

Apply plugin envvars to phases not on command line#4472

Open
happz wants to merge 6 commits intomainfrom
apply-plugin-envvars-to-phases-not-on-command-line
Open

Apply plugin envvars to phases not on command line#4472
happz wants to merge 6 commits intomainfrom
apply-plugin-envvars-to-phases-not-on-command-line

Conversation

@happz
Copy link
Copy Markdown
Contributor

@happz happz commented Jan 9, 2026

Plugin envvars take effect even when plugin is not mentioned on CLI

This was a major drawback when using envvars to populate or change
phases' configuration: plugin-specific envvars had no effect unless the
plugin was invoked via command line. This was caused by Click consuming
them, and without mentioning the plugin on command line, Click was not
invoked, therefore nothing consumed said envvars.

The patch adds one more pass into the application of CLI invocations
where we collect all these envvars, and then we use Click to process
them. The produced values are then added into raw step data.

We do not use custom parsers or type casting, we identify the plugin in
question from the envvar name, and use its Click command and its
parameters to perform the necessary steps for us. This should be
equivalent to what Click does when crunching the command line.

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • include a release note

@happz happz added this to planning Jan 9, 2026
@happz happz added code | cli Changes related to the command line interface area | environment Environment variables handling ci | full test Pull request is ready for the full test execution labels Jan 9, 2026
@github-project-automation github-project-automation Bot moved this to backlog in planning Jan 9, 2026
Comment thread tmt/steps/__init__.py Outdated
@happz happz moved this from backlog to review in planning Jan 9, 2026
@happz happz force-pushed the apply-plugin-envvars-to-phases-not-on-command-line branch 2 times, most recently from ed55ac9 to 4958b5a Compare March 2, 2026 08:52
@happz happz force-pushed the apply-plugin-envvars-to-phases-not-on-command-line branch from 4958b5a to 6f0d7cb Compare March 19, 2026 10:42
@happz happz force-pushed the apply-plugin-envvars-to-phases-not-on-command-line branch from 6f0d7cb to 36ce777 Compare March 31, 2026 16:51
@happz happz force-pushed the apply-plugin-envvars-to-phases-not-on-command-line branch from 36ce777 to f794152 Compare April 20, 2026 10:27
@psss psss added this to the 1.73 milestone Apr 24, 2026
happz added 6 commits April 24, 2026 15:15
This was a major drawback when using envvars to populate or change
phases' configuration: plugin-specific envvars had no effect unless the
plugin was invoked via command line. This was caused by Click consuming
them, and without mentioning the plugin on command line, Click was not
invoked, therefore nothing consumed said envvars.

The patch adds one more pass into the application of CLI invocations
where we collect all these envvars, and then we use Click to process
them. The produced values are then added into raw step data.

We do not use custom parsers or type casting, we identify the plugin in
question from the envvar name, and use its Click command and its
parameters to perform the necessary steps for us. This should be
equivalent to what Click does when crunching the command line.
@happz happz force-pushed the apply-plugin-envvars-to-phases-not-on-command-line branch from f794152 to 730a38a Compare April 24, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area | environment Environment variables handling ci | full test Pull request is ready for the full test execution code | cli Changes related to the command line interface

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

2 participants