Skip to content

fix: adjust name for ActionIdentifier to a fixed value "a0"#7092

Draft
SZL741023 wants to merge 1 commit intoflyteorg:v2from
SZL741023:v2_fix
Draft

fix: adjust name for ActionIdentifier to a fixed value "a0"#7092
SZL741023 wants to merge 1 commit intoflyteorg:v2from
SZL741023:v2_fix

Conversation

@SZL741023
Copy link
Contributor

@SZL741023 SZL741023 commented Mar 25, 2026

Tracking issue

Why are the changes needed?

Assign value "a0" to details.action.id.name , but it is one of the unique index in idx_action_domain.
If this value is fixed, that mean all workflow only can have a run task, so add the run_name to be one of the unique index in idx_action_domain.

What changes were proposed in this pull request?

Fix the duplicated key not allowed issue for adjusting details.action.id.name to fixed value
Add run_name to unique index idx_actions_identifier.
Add migrate function to drop old index idx_actions_identifier before build new type idx_actions_identifier
Sync action_test.go constraint

How was this patch tested?

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Test Result

  • create run
{
  "run": {
    "action": {
      "id": {
        "run": {
          "org": "testorg",
          "project": "flytesnacks",
          "domain": "development",
          "name": "rd4qrczzhklqrhvmt6zc"
        },
        "name": "a0"
      },
      "metadata": {
        "task": {
          "id": {
            "org": "testorg",
            "project": "flytesnacks",
            "domain": "development",
            "name": "hello_world.say_hello",
            "version": "ae90079690e275d2dd68fadbf4a66641"
          },
          "taskType": "python",
          "shortName": "hello_world.say_hello"
        },
        "actionType": "ACTION_TYPE_TASK",
        "funtionName": "hello_world.say_hello"
      },
      "status": {
        "phase": "ACTION_PHASE_QUEUED",
        "startTime": "2026-03-25T17:34:12.957506Z",
        "attempts": 1
      }
    }
  }
}
  • get run details
{
  "details": {
    "action": {
      "id": {
        "run": {
          "org": "testorg",
          "project": "flytesnacks",
          "domain": "development",
          "name": "rd4qrczzhklqrhvmt6zc"
        },
        "name": "a0"
      },
      "metadata": {
        "task": {
          "id": {
            "org": "testorg",
            "project": "flytesnacks",
            "domain": "development",
            "name": "hello_world.say_hello",
            "version": "ae90079690e275d2dd68fadbf4a66641"
          },
          "taskType": "python",
          "shortName": "hello_world.say_hello"
        },
        "actionType": "ACTION_TYPE_TASK",
        "funtionName": "hello_world.say_hello"
      },
      "status": {
        "phase": "ACTION_PHASE_INITIALIZING",
        "startTime": "2026-03-25T17:34:12.957506Z"
      },
  • main

fix the duplicated key not allowed issue for adjusting name to fixed
value
add run_name to unique index idx_actions_identifier
add function to drop old index idx_actions_identifier before build new
idx_actions_identifier
sync action_test.go constraint

Signed-off-by: SZL741023 <shengzhe.lin@icloud.com>
@github-actions github-actions bot mentioned this pull request Mar 25, 2026
3 tasks
@pingsutw pingsutw added this to the V2 GA milestone Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants