Skip to content

Release 1.4.1: fix missing tf_policy_checked/tf_policy_override RunStatus values - #199

Merged
iam404 merged 1 commit into
mainfrom
fix/run-status-tf-policy
Aug 21, 2026
Merged

Release 1.4.1: fix missing tf_policy_checked/tf_policy_override RunStatus values#199
iam404 merged 1 commit into
mainfrom
fix/run-status-tf-policy

Conversation

@isivaselvan

@isivaselvan isivaselvan commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • RunStatus was missing tf_policy_checked and tf_policy_override — the tf-policy analogues of the pre-existing policy_checked/policy_override statuses. Atlas transitions a run to tf_policy_override when its plan-stage tf-policy evaluation pauses awaiting an override decision (run.rb: transitions from: :planned, to: :tf_policy_override).
  • Without these values, client.runs.read()/.list() raised a pydantic ValidationError instead of returning the run, the moment a run's wire status became tf_policy_override.
  • Confirmed go-tfe never had this gap: its Runs_attributes_status type is Kiota-generated from the OpenAPI spec, which already documents both values as public-beta. pytfe's RunStatus is hand-maintained and simply missed the addition.
  • Found via live testing of the hashicorp.terraform Ansible collection's new tf-policy modules (tf_policy_evaluation_info, tf_policy_evaluation) against a real HCP Terraform run that reached this status — no mocked unit fixture had exercised it before.
  • Bumps pytfe to 1.4.1.

Test plan

  • Added regression tests (TestRunStatusTfPolicy) confirming both statuses parse correctly on the Run model.
  • pytest tests/units — 1179 passed.
  • make lint (ruff + mypy) — clean.
  • Verified live: a run that paused at tf_policy_override on prab-sandbox02 now parses correctly with this fix installed, where it previously raised.

…values

atlas introduced these two run statuses alongside tf-policy (the analogues
of the pre-existing policy_checked/policy_override statuses for the
Sentinel/OPA flow), but RunStatus never picked them up. A run paused
awaiting a tf-policy override decision reports status: "tf_policy_override"
on the wire, and client.runs.read()/.list() raised a pydantic validation
error instead of returning the run.

Found via live testing of the hashicorp.terraform Ansible collection's new
tf-policy modules against a real run that reached this status - no mocked
unit fixture had exercised it before. Bumps to 1.4.1.
@isivaselvan
isivaselvan requested a review from a team as a code owner August 21, 2026 05:11
@iam404
iam404 merged commit f93207e into main Aug 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants