Skip to content

Conversation

@olicassis
Copy link

What type of PR is this?

/kind feature
What this PR does / why we need it:

This PR introduces an optional ignore_required_on_commit flag under parameters.activity_options, allowing blueprint authors to bypass required-field validation when committing an activity. This provides flexibility for processes where external inputs may be incomplete or validated later.

The default behavior remains strict validation, ensuring full backward compatibility for all existing applications relying on required-field enforcement.

A comprehensive test suite was added to validate:

  • Legacy validation behavior (strict required fields)
  • New bypass behavior when ignore_required_on_commit is true
  • Preservation of type validation even when required fields are bypassed
  • Proper activity ordering (newest first)
  • Persistence of committed activities
  • Schema-less commit behavior

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

  • Fully backward compatible; no breaking changes.
  • Only required rules are conditionally bypassed—type validation still applies.
  • Test coverage includes all validation and commit branches.
  • No database or persistence format changes.

Does this PR introduce a user-facing change?

Added optional support for `parameters.activity_options.ignore_required_on_commit`, allowing blueprints to bypass required-field validation during `commitActivity`.  
Default behavior remains unchanged for existing users.

Additional documentation e.g., usage docs, etc.

A new optional blueprint setting is available:

parameters:
  activity_options:
    ignore_required_on_commit: true | false

When set to `true`, the `commitActivity` method will skip JSON Schema
required-field checks while still validating all data types and object structure.

Example:

{
  "parameters": {
    "activity_options": {
      "ignore_required_on_commit": true
    }
  }
}

This enables committing incomplete activity payloads in workflows that
collect data incrementally.

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.

1 participant