Skip to content

Conversation

@happz
Copy link
Contributor

@happz happz commented Dec 29, 2025

It is no longer merged into test environment. That leaves the test environment untainted and with its original content. The plan environment is then exposed to test when invoked, as any other environment component.

Related to #4241.

Pull Request Checklist

  • implement the feature

@happz happz added this to planning Dec 29, 2025
@happz happz added code | style Code style changes not affecting functionality code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. ci | full test Pull request is ready for the full test execution labels Dec 29, 2025
@github-project-automation github-project-automation bot moved this to backlog in planning Dec 29, 2025
@happz happz force-pushed the test-invocation-checks-moved branch from 9642993 to 8b5a98b Compare December 29, 2025 20:41
@happz happz force-pushed the plan-environment-decoupled-from-test branch from 9f1638e to 5cf11be Compare December 29, 2025 20:43
@happz happz force-pushed the plan-environment-decoupled-from-test branch from 5cf11be to 6ab53e0 Compare December 29, 2025 20:49
@happz happz force-pushed the test-invocation-checks-moved branch from 8b5a98b to d291881 Compare December 29, 2025 21:19
This will present the same environment to all users of test invocation,
from checks to test itself and its results. It was also not clear who is
responsible for the environment and its composition, now when it's part
of the invocation, all `execute` plugins should see the same content.
It is no longer merged into test environment. That leaves the test
environment untainted and with its original content. The plan
environment is then exposed to test when invoked, as any other
environment component.

Related to #4241.
@happz happz force-pushed the plan-environment-decoupled-from-test branch from 6ab53e0 to f553a7c Compare December 29, 2025 21:21
def environment(self) -> Environment:
if self._environment is None:
# narrow type
parent = cast(Execute, self.phase.parent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the cast here if we are doing the assert isinstance?

assert self.phase.parent.plan.my_run is not None
# narrow type
run = cast(tmt.base.Run, parent.plan.my_run)
assert run is not None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could squeeze in a type annotation of the Plan, that could avoid the cast here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. code | style Code style changes not affecting functionality

Projects

Status: backlog

Development

Successfully merging this pull request may close these issues.

3 participants