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

Add tctl schedule commands #221

Merged
merged 3 commits into from
Jun 14, 2022
Merged

Add tctl schedule commands #221

merged 3 commits into from
Jun 14, 2022

Conversation

dnr
Copy link
Member

@dnr dnr commented Jun 8, 2022

What was changed

Adding tctl commands for manipulating schedules.

Why?

This is one of two main interfaces to the feature.

Checklist

  1. Closes

  2. How was this tested:
    tested manually

  3. Any docs updates needed?
    yes, doc updates coming soon

@dnr dnr requested a review from feedmeapples June 8, 2022 08:21
@dnr
Copy link
Member Author

dnr commented Jun 8, 2022

The diff for the test failure is

--- a   2022-06-08 10:12:16.229019661 -0700
+++ b   2022-06-08 10:12:19.623037407 -0700
@@ -1,6 +1,7 @@
 "{EventId:1, EventType:WorkflowExecutionStarted, Version:0, TaskId:0,"
 "Attributes:{WorkflowExecutionStartedEventAttributes:{WorkflowType:{Name:helloworldWorkflow},"
 "ParentInitiatedEventId:0, TaskQueue:{Name:taskQueue, Kind:Unspecified},"
-"Input:[\"LongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongText ... ongTextLongText"
-"LongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongText"
-" LongText\"], WorkflowRunTimeout:1m0s, WorkflowTaskTimeout:10s, Initiator:Unspecified, Identity:tester, Attempt:0}}}"
+"Input:[\"LongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongText ..."
+"tLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongTextLongText"
+"LongText\"], WorkflowRunTimeout:1m0s, WorkflowTaskTimeout:10s, Initiator:Unspecified, Identity:tester,"
+"Attempt:0, ParentInitiatedEventVersion:0}}}"

I think the api bump added the ParentInitiatedEventVersion field and that threw things off? It looks correct so I'm just going to update the test.

cli/flags.go Outdated Show resolved Hide resolved
cli/schedule.go Outdated Show resolved Hide resolved
cli/schedule.go Outdated
Required: true,
}
overlap := &cli.StringFlag{
Name: FlagOverlapPolicy,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this currently not used?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is used, for create and update

&cli.StringSliceFlag{
Name: FlagCalendar,
Aliases: FlagCalendarAlias,
Usage: `Calendar specification in JSON, e.g. {"dayOfWeek":"Fri","hour":"17","minute":"5"}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have docs for this? if yes we can add a link right here for details

Copy link
Member Author

Choose a reason for hiding this comment

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

docs aren't written yet. it's coming up soon on my list of stuff to do. we can add a link later.

also, commas won't work in this field until we fix the cli issue I mentioned

cli/schedule.go Outdated Show resolved Hide resolved
cli/schedule.go Outdated Show resolved Hide resolved
cli/commands.go Outdated Show resolved Hide resolved
cli/schedule.go Outdated Show resolved Hide resolved
@dnr dnr merged commit c3e45ba into temporalio:main Jun 14, 2022
@dnr dnr deleted the schedpr1 branch June 14, 2022 20:20
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.

2 participants