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 FirstRunAt field to start workflow option logic #6178

Merged
merged 12 commits into from
Jul 26, 2024

Conversation

timl3136
Copy link
Member

@timl3136 timl3136 commented Jul 19, 2024

What changed?
Add FirstRunAt field logic handling to start workflow option logic. The field will override delay start and jitter start seconds for the first run of the workflow in order to provide a precise start time.

Why?
We need a mechanism to allow the first run of a workflow to be schedule at some exact time. Currently, the only way is to calculate the delay start required and that is often not accurate enough. If the user want to modify the first run of a cron workflow, they need to know the precise timestamp when they run the command in order to calculate the necessary delay start seconds needed.

How did you test it?
Unit tests, also tested in local as well as dev environment.
For compatibility testing, we tested the change in following configuration ensuring that it maintain compatibility:
Server w/ change with client w/o change
Server w/o change with client w/ change
Server w/ change with client w/ change.

Potential risks
There might be incompatibility issues between different versions of server and client. But in the worst case, the logic will be ignored and not alter existing logic in other ways.

Release notes

Documentation Changes

Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 85.29412% with 5 lines in your changes missing coverage. Please review.

Project coverage is 72.80%. Comparing base (3248455) to head (f39ed87).
Report is 18 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
common/types/mapper/proto/api.go 98.32% <100.00%> (+<0.01%) ⬆️
common/types/mapper/thrift/shared.go 97.70% <100.00%> (+<0.01%) ⬆️
...tory/engine/engineimpl/start_workflow_execution.go 70.93% <100.00%> (+0.05%) ⬆️
...vice/history/task/transfer_active_task_executor.go 66.63% <100.00%> (+0.03%) ⬆️
tools/cli/flags.go 99.74% <100.00%> (+<0.01%) ⬆️
common/util.go 78.46% <85.71%> (+0.15%) ⬆️
tools/cli/workflow_commands.go 36.75% <50.00%> (+1.06%) ⬆️

... and 23 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3248455...f39ed87. Read the comment docs.

@timl3136 timl3136 marked this pull request as ready for review July 24, 2024 17:07
@timl3136 timl3136 changed the title WIP: Add FirstRunAt field to start workflow option logic Add FirstRunAt field to start workflow option logic Jul 24, 2024
common/types/mapper/proto/api.go Show resolved Hide resolved
common/types/mapper/thrift/shared.go Show resolved Hide resolved
common/util_test.go Show resolved Hide resolved
tools/cli/flags.go Outdated Show resolved Hide resolved
tools/cli/workflow_commands.go Outdated Show resolved Hide resolved
@taylanisikdemir
Copy link
Member

Can you update PR description with testing details? Please cover how you tested with old and new clients.

@timl3136 timl3136 enabled auto-merge (squash) July 26, 2024 17:27
@timl3136 timl3136 merged commit f3350d0 into cadence-workflow:master Jul 26, 2024
17 of 18 checks passed
Groxx added a commit that referenced this pull request Aug 20, 2024
…th go module (#6241)

`idls/` and the `github.com/uber/cadence-idl` version in `go.mod` are currently out of sync and more than a little screwed up:
- the go module is on `0482c040f91d17be35cccee2bc1cf883f7344992`
- the IDL submodule is on `1cd936eb8e24d42f8d8cd38d6216e619c14c48d5`

The go module is currently on cadence-workflow/cadence-idl@0482c04
which is the latest `master` and seems fine.

The current IDL submodule: https://github.com/uber/cadence-idl/tree/1cd936eb8e24d42f8d8cd38d6216e619c14c48d5
doesn't belong to any branch (much less `master`), and is in danger of being GC'd if we don't do something about that.

It's probably from a temporary PR branch that was cleaned up as part of #6178 (the contents are similar to https://github.com/uber/cadence-idl/tree/d92bb53292d64b698c0c5600bbd6e258e728a020 which was approved and _is_ on `master`), but I can't find `1cd936eb8e24d42f8d8cd38d6216e619c14c48d5` in any PR in either https://github.com/uber/cadence-idl or https://github.com/timl3136/cadence-idl so I'm really not sure.

So this PR contains a few changes:
- moves `idls/` to match `go.mod` SHA: `0482c040f91d17be35cccee2bc1cf883f7344992`
  - `d92bb53292d64b698c0c5600bbd6e258e728a020` did not build, as the service code for `ListAll...` was removed, which is also why I didn't just revert the related commits.
- adds a `make .idl-status` and CI steps to verify that this all stays in sync in the future, because this is all VERY easy to miss in PR reviews, and github's UI just makes it worse by hiding many of these details.
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