Skip to content

Commit

Permalink
Merge pull request #1728 from znicholasbrown/nicholas/task-and-flow-n…
Browse files Browse the repository at this point in the history
…ames

Flow run names
  • Loading branch information
joshmeek committed Nov 15, 2019
2 parents 42636b9 + 0c94fac commit 0846e9a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ These changes are available in the [master branch](https://github.com/PrefectHQ/
### Enhancements

- Raise an informative error when context objects are pickled - [#1710](https://github.com/PrefectHQ/prefect/issues/1710)
- Add an option to pass in `run_name` to a flow run to override the auto-generated names when calling `create_flow_run` [#1661](https://github.com/PrefectHQ/cloud/pull/1661)
- Add informative logs in the event that a heartbeat thread dies - [#1721](https://github.com/PrefectHQ/prefect/pull/1721)
- Loosen Job spec requirements for `KubernetesJobEnvironment` - [#1713](https://github.com/PrefectHQ/prefect/pull/1713)
- Loosen `containerDefinitions` requirements for `FargateTaskEnvironment` - [#1713](https://github.com/PrefectHQ/prefect/pull/1713)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

install:
- "%PYTHON%/Scripts/pip.exe install pytest"
- "%PYTHON%/Scripts/pip.exe install pytest==5.2.2"
- "%PYTHON%/Scripts/pip.exe install ."

test_script:
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ black
graphviz >= 0.8, < 0.14
jinja2 >= 2.0, < 3.0
mypy >= 0.600, < 0.800
pytest >= 5.0, < 6.0
pytest >= 5.0, < 5.2.3
pytest-cov >= 2.6, < 3.0
pytest-env >= 0.6.0, < 0.7.0
pytest-xdist >= 1.23, < 2.0
Expand Down
4 changes: 4 additions & 0 deletions src/prefect/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ def create_flow_run(
parameters: dict = None,
scheduled_start_time: datetime.datetime = None,
idempotency_key: str = None,
run_name: str = None,
) -> str:
"""
Create a new flow run for the given flow id. If `start_time` is not provided, the flow run will be scheduled to start immediately.
Expand All @@ -635,6 +636,7 @@ def create_flow_run(
will return the ID of the originally created run (no new run will be created after the first).
An error will be raised if parameters or context are provided and don't match the original.
Each subsequent request will reset the TTL for 24 hours.
- run_name (str, optional): The name assigned to this flow run
Returns:
- str: the ID of the newly-created flow run
Expand All @@ -658,6 +660,8 @@ def create_flow_run(
inputs.update(
scheduledStartTime=scheduled_start_time.isoformat()
) # type: ignore
if run_name is not None:
inputs.update(flowRunName=run_name) # type: ignore
res = self.graphql(create_mutation, variables=dict(input=inputs))
return res.data.createFlowRun.flow_run.id # type: ignore

Expand Down

0 comments on commit 0846e9a

Please sign in to comment.