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

Error creating schedules with Temporal CLI when passing a JSON object with multiple key:value pairs to --input #188

Closed
stlaisaar opened this issue Apr 6, 2023 · 5 comments

Comments

@stlaisaar
Copy link

Expected Behavior

Running the Temporal CLI command for creating schedules (temporal schedule create) creates a schedule according to provided arguments (such as --input {\"TestNumber\":\"650537101\",\"TestID\":1}).

Actual Behavior

No schedule is created when running the Temporal CLI command for creating schedules. The following output (error) is shown in Command Prompt:

  • Error: input is not valid JSON: unexpected end of JSON input
    ('export TEMPORAL_CLI_SHOW_STACKS=1' to see stack traces)

Steps to Reproduce the Problem

  1. Deploy the Temporal Server using the docker-compose.yml file from https://github.com/temporalio/docker-compose.
  2. Open Command Prompt
  3. Run docker exec temporal-admin-tools temporal schedule create -s test-schedule-id -w test-scheduled-workflow -t TEST_TASK_QUEUE --workflow-type TestWorkflow --input {\"TestNumber\":\"650537101\",\"TestID\":1} --interval 1m

Specifications

  • Version: 1.20.0
  • Platform: Windows 10

Additional context

  1. Passing only one key:value pair in the JSON object input works. For example, a schedule is successfully created when the input is --input {\"CardNumber\":\"650537101\"}.
  2. Using tctl instead of Temporal CLI (and changing some flags where necessary) works. For example, a schedule is successfully created when running docker exec temporal-admin-tools tctl schedule create --sid test-schedule-id --wid test-scheduled-workflow -tq TEST_TASK_QUEUE -wt TestWorkflow --input {\"TestNumber\":\"650537101\",\"TestID\":1} --interval 1m.
@dnr dnr transferred this issue from temporalio/temporal Apr 11, 2023
@dnr
Copy link
Member

dnr commented Apr 11, 2023

Probably dup of #159 . Try 0.7.0?

@stlaisaar
Copy link
Author

Manually downloading the 0.7.0 version of the EXE and using that to run the previously problematic command works. So 0.7.0 has fixed my issue as well, thank you!

However, I would still like to be able to use the docker-compose.yml file from https://github.com/temporalio/docker-compose. How can I make sure that it uses version 0.7.0 (or newer) of the Temporal CLI?
Another note, checking the used versions with docker exec temporal-admin-tools temporal -v returns temporal version 0.0.0 (server 1.20.0) (ui 2.11.0) which seems to be incorrect.

@feedmeapples
Copy link
Contributor

feedmeapples commented Apr 11, 2023

Another note, checking the used versions with docker exec temporal-admin-tools temporal -v returns temporal version 0.0.0 (server 1.20.0) (ui 2.11.0) which seems to be incorrect.

This is a bug in the docker image build process which doesn't set the proper version using ldflags, similarly to goreleaser . Filed a bug to address this temporalio/docker-builds#107

@feedmeapples
Copy link
Contributor

feedmeapples commented Apr 11, 2023

How can I make sure that it uses version 0.7.0 (or newer) of the Temporal CLI?

until #107 is addressed, CLI version 0.7.0 can be checked by matching the Server or UI versions. This is the result from brew and GitHub release binaries:

VERSION:
   0.7.0 (server 1.20.0) (ui 2.13.3)

@bergundy
Copy link
Member

Fixed in #148

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

No branches or pull requests

4 participants