Skip to content

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

Merged
pingsutw merged 4 commits intoflyteorg:v2from
SZL741023:v2_fix
Mar 27, 2026
Merged

fix: adjust name for ActionIdentifier to a fixed value "a0"#7092
pingsutw merged 4 commits intoflyteorg:v2from
SZL741023:v2_fix

Conversation

@SZL741023
Copy link
Copy Markdown
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"
      },
image
  • 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
…nName

New const variable rootActionName to be assign "a0"
Remove drop old idx_actions_identifier function
Adjust all test function to match name is "a0"

Signed-off-by: SZL741023 <shengzhe.lin@icloud.com>
Signed-off-by: SZL741023 <shengzhe.lin@icloud.com>
@SZL741023 SZL741023 marked this pull request as ready for review March 26, 2026 15:41
const (
runIDLength = 20
runStringFormat = "r%s"
RootActionName = "a0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we directly use this in other places rather then re-define rootActionName or use "a0"?

Copy link
Copy Markdown
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

Update: Ignore it, not related to your PR, sorry.
seeing this error when running the task. https://github.com/flyteorg/flyte-sdk/blob/d1be428f793dd9f9f51f97c0fd677fd43865a5c4/examples/basics/hello.py#L1-L37

Pod failed. No message received from kubernetes.
[rrnx9b8km7bh59x6kpf9-a0-0] terminated with exit code (1). Reason [Error]. Message: 
tine)
  File "/opt/venv/lib/python3.12/site-packages/flyte/_utils/coro_management.py", line 26, in run_coros
    raise err
  File "/opt/venv/lib/python3.12/site-packages/flyte/_internal/runtime/entrypoints.py", line 206, in load_and_run_task
    task = await _download_and_load_task(code_bundle, resolver, resolver_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/flyte/_internal/runtime/entrypoints.py", line 140, in _download_and_load_task
    code_bundle = await download_code_bundle(code_bundle)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/flyte/_internal/runtime/entrypoints.py", line 130, in download_code_bundle
    downloaded_path = await download_bundle(code_bundle)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/flyte/storage/_storage.py", line 227, in get
    return await _get_obstore_bypass(from_path, to_path, recursive, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/flyte/storage/_storage.py", line 191, in _get_obstore_bypass
    await reader.download_files(
  File "/opt/venv/lib/python3.12/site-packages/flyte/storage/_parallel_reader.py", line 288, in download_files
    async for _ in self._as_completed(_gen(temporary_dir), transformer=_transform_decorator(temporary_dir)):
  File "/opt/venv/lib/python3.12/site-packages/flyte/storage/_parallel_reader.py", line 197, in _as_completed
    async with asyncio.TaskGroup() as tg:
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/taskgroups.py", line 71, in __aexit__
    return await self._aexit(et, exc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/taskgroups.py", line 164, in _aexit
    raise BaseExceptionGroup(
Filtered traceback (most recent call last):
ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)

Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw merged commit 4ba6739 into flyteorg:v2 Mar 27, 2026
15 of 17 checks passed
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.

3 participants