Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query for CloseTime is null does not return results #6576

Open
natenjoy opened this issue Sep 30, 2024 · 1 comment
Open

Query for CloseTime is null does not return results #6576

natenjoy opened this issue Sep 30, 2024 · 1 comment

Comments

@natenjoy
Copy link

Expected Behavior

Query from the command line returns a result for the query that is still in Running status. Query:

temporal workflow list -n preflight --address 10.43.63.119:7233 -q 'CloseTime is null AND WorkflowId = "S329229X8820832"'

Actual Behavior

Query returns no results.

Oddly, if I do the same query but query where close time is not null (CloseTime it not null), I get results for all past workflows AND the currently running workflow.

If I further do a json-formatted output on the list, the one that is running does not show a close time. (query temporal workflow list -n preflight --address 10.43.63.119:7233 -q 'CloseTime is not null AND WorkflowId = "S329229X8820832"' -o json)

{
    "execution": {
      "workflow_id": "S329229X8820832",
      "run_id": "8b9279db-15e6-4296-bb71-e1c2569af382"
    },
    "type": {
      "name": "Preflight"
    },
    "start_time": "2024-09-30T17:19:35.465393Z",
    "status": 1,
    "execution_time": "2024-09-30T17:19:35.465393Z",
    "memo": {},
    "search_attributes": {
      "indexed_fields": {
        "BuildIds": {
          "metadata": {
            "encoding": "anNvbi9wbGFpbg==",
            "type": "S2V5d29yZExpc3Q="
          },
          "data": "WyJ1bnZlcnNpb25lZCIsInVudmVyc2lvbmVkOjczMTQwYjk0MmMzNmQyOWM0YTBjNWY3NTBiMWNjMTEyIl0="
        }
      }
    },
    "task_queue": "PREFLIGHT"
  }

One of the closed ones that does have a close time, does show the close time in the output:

{
    "execution": {
      "workflow_id": "S329229X8820832",
      "run_id": "d3324372-98e0-40e9-a874-326bd48cfc0e"
    },
    "type": {
      "name": "Preflight"
    },
    "start_time": "2024-09-19T20:52:55.034558Z",
    "close_time": "2024-09-26T20:21:24.576403Z",
    "status": 4,
    "history_length": 24,
    "execution_time": "2024-09-19T20:52:55.034558Z",
    "memo": {},
    "search_attributes": {
      "indexed_fields": {
        "BuildIds": {
          "metadata": {
            "encoding": "anNvbi9wbGFpbg==",
            "type": "S2V5d29yZExpc3Q="
          },
          "data": "WyJ1bnZlcnNpb25lZCIsInVudmVyc2lvbmVkOjhkN2JlMGQwYWNiOTUyMDkxOGFiODc3N2I2MTk5NzE2IiwidW52ZXJzaW9uZWQ6NzMxNDBiOTQyYzM2ZDI5YzRhMGM1Zjc1MGIxY2MxMTIiXQ=="
        }
      }
    },
    "task_queue": "PREFLIGHT",
    "state_transition_count": 16,
    "history_size_bytes": 11290
  }

Steps to Reproduce the Problem

  1. Create a workflow that stays running long enough to run queries.
  2. Run the query.

Specifications

The query has worked locally using https://temporal.io/blog/auto-setup and the docker hub image https://hub.docker.com/r/temporalio/server, but does not work in a self hosted environment. Description of the self hosted envrionment:

  • Runs in kubernetes
  • Set up following https://github.com/temporalio/helm-charts, with chart deployetemporal-0.37.0 , version 1.23.1
  • Visibility store is set up against a postgres:16.3 running in the same kube cluster
  • As stated in the chart, temporal version is 1.23.1
@bergundy
Copy link
Member

Thanks, we will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants