Skip to content

Publishing a policy with invalid violation_action property breaks policy screen #10061

@octopus-hideaki

Description

@octopus-hideaki

Severity

Sev-2

Version

Reported on 2026.1

Latest Version

I could reproduce the problem in the latest build

What happened?

When a Compliance Policy OCL has an invalid violation_action (anything other than block or warn), the user can publish the policy. When you publish the policy, you get the error "Cannot parse 'error' to 'CompliancePolicyViolationAction'" on the policy screen, which prevents the user from accessing the list of policies.

This error persists even after the version-controlled OCL is corrected, because the invalid version persists in the DB.

Reproduction

  1. Create a policy
  2. Edit policy (via git) and change "violation_action" to "error" (Invalid value)
  3. Go into Octopus > Platform Hub > Policies > Policy > Publish
  4. Go back to the policy screen
  5. Observe the error

Error and Stacktrace

More Information

No response

Workaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugThis issue represents a verified problem we are committed to solving

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions