Prefect

Latest version: v2.82

Safety actively analyzes 630305 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 44

2.18.2

💡 Providing a deployment name to `flow.serve` is now optional

When running `flow.serve`, you can now omit the deployment name. If you do not provide a deployment name, the deployment name will default to the name of the flow. This change makes it easier to run flows without needing to specify a deployment name each time:

python
flow
def etl_flow():
pass

if __name__ == "__main__":
etl_flow.serve()

results in:
bash
Your flow 'etl-flow' is being served and polling for scheduled runs!

To trigger a run for this flow, use the following command:

$ prefect deployment run 'etl-flow/etl-flow'


🛠✨ We've also released a few important fixes to our deployment parameter form when creating a run in the Prefect UI! 🧑‍🎨

🚀 This release also includes a number of other fixes and in-flight feature work. See the [release notes](https://github.com/PrefectHQ/prefect/blob/main/RELEASE-NOTES.md#release-2182) for more details!

2.18.1

Fixes
- Fix improper context access for nested async task outside of flow — https://github.com/PrefectHQ/prefect/pull/12810
- Fix using default interval schedule in `prefect deploy` — https://github.com/PrefectHQ/prefect/pull/12833
- Handle case in `validationUpdate` schema where definitions are falsy — https://github.com/PrefectHQ/prefect/pull/12880
- Allow `prefect cloud login` to override current workspace — https://github.com/PrefectHQ/prefect/pull/12867
- Remove extra quotes in `prefect deployment run --watch` — https://github.com/PrefectHQ/prefect/pull/12894

Experimental

Events and Automations
- Support filtering by automation name:
- https://github.com/PrefectHQ/prefect/pull/12850
- https://github.com/PrefectHQ/prefect/pull/12884
- https://github.com/PrefectHQ/prefect/pull/12887
- Add support for using the "normal" Trigger classes for `flow.serve` and `.deploy` — https://github.com/PrefectHQ/prefect/pull/12789
- Add an account-level event subscriber — https://github.com/PrefectHQ/prefect/pull/12808
- Emit flow run state change events — https://github.com/PrefectHQ/prefect/pull/12825
- Emit deployment status persistence and events — https://github.com/PrefectHQ/prefect/pull/12853
- Enable event streaming from `PrefectCloudEventSubscriber` via CLI — https://github.com/PrefectHQ/prefect/pull/12796
- Update the `prefect automation delete` CLI — https://github.com/PrefectHQ/prefect/pull/12876

Engine
- Add new experimental engine for tasks and flows with improved readability and extensibility — https://github.com/PrefectHQ/prefect/pull/12856

Documentation
- Improve installation instructions — https://github.com/PrefectHQ/prefect/pull/12783
- Improve quickstart — https://github.com/PrefectHQ/prefect/pull/12798
- Migrate `prefect-azure` docs to Integrations section of the Prefect docs — https://github.com/PrefectHQ/prefect/pull/12794
- Update storage guide credentials blocks — https://github.com/PrefectHQ/prefect/pull/12819
- Remove `server` import recommendations — https://github.com/PrefectHQ/prefect/pull/12823
- Remove link to removed API page — https://github.com/PrefectHQ/prefect/pull/12824
- Add Azure Container Instances worker guide — https://github.com/PrefectHQ/prefect/pull/12846
- Improve wording on integrations index page — https://github.com/PrefectHQ/prefect/pull/12852

Prefect UI Library
- Add `FormattedDate` component to display accessible, long-form timestamps consistently
- Update modal buttons and add auto-close to the parameters and job variable modals — https://github.com/PrefectHQ/prefect-ui-library/pull/2320
- Add flow run list information density — https://github.com/PrefectHQ/prefect-ui-library/pull/2321
- Fix "Run a deployment" action not populating the default parameters from the deployment — https://github.com/PrefectHQ/prefect-ui-library/pull/2322
- Fix schema form properties with no default value from defaulting to `null` (`None`) — https://github.com/PrefectHQ/prefect-ui-library/pull/2323
- Update date-fns and date-fns-tz — https://github.com/PrefectHQ/prefect-ui-library/pull/2319
- Use correct icon colors for non-destructive actions in the UI — https://github.com/PrefectHQ/prefect-ui-library/pull/2328

Integrations
Prefect CGP
- Remove API ref to nonexistent Google Cloud Run V2 page — https://github.com/PrefectHQ/prefect-gcp/pull/260
- Fix VPC access for Cloud v2 worker — https://github.com/PrefectHQ/prefect-gcp/pull/266
- Handle case where `vpc` isn't in job template — https://github.com/PrefectHQ/prefect-gcp/pull/267

New Contributors
* keizobabybear made their first contribution in https://github.com/PrefectHQ/prefect/pull/12852

2.18.0

Breaking Changes
- Remove deprecated ability to use `deployment.yaml` in `prefect deploy` — https://github.com/PrefectHQ/prefect/pull/12731
- Remove deprecated ability to pass `-f/--flow` as option to `prefect deploy` — https://github.com/PrefectHQ/prefect/pull/12732
- Remove deprecated `projects` from `prefect deploy` — https://github.com/PrefectHQ/prefect/pull/12737
- Remove deprecated `--ci` option from `prefect deploy` — https://github.com/PrefectHQ/prefect/pull/12740

Enhancements
- Improve account selection in `prefect cloud login` and `workspace set` — https://github.com/PrefectHQ/prefect/pull/12717


**Full Changelog:** https://github.com/PrefectHQ/prefect/compare/2.17.0...2.18.0

See [the release notes](https://github.com/PrefectHQ/prefect/blob/1006d2d8af397f3bf00218be3783b992144b3da6/RELEASE-NOTES.md#release-2180) for more!

2.17.1

Fixes
- Fix events storage import — https://github.com/PrefectHQ/prefect/pull/12681
- Remove `opentelemetry` import — https://github.com/PrefectHQ/prefect/pull/12684

**All changes**: https://github.com/PrefectHQ/prefect/compare/2.17.0...2.17.1

2.17.0

🧮 Manage Prefect variables via the Python SDK

Prefect variables are useful for storing and reusing data and configuration between and across workflows; and previously you could only create and update variables via the Prefect UI. With this release, you can now get and set Prefect variables directly in your Python code with the new `Variable.set` and `Variable.get` methods!

For an example of reading and writing variable values in Python see the following example:

python
from prefect.variables import Variable

set a variable
variable = Variable.set(name="the_answer", value="42")

get a variable
answer = Variable.get('the_answer')
print(answer.value)
42

get a variable with a default value
answer = Variable.get('not_the_answer', default='42')
print(answer.value)
42

update a variable
answer = Variable.set(name="the_answer", value="43", overwrite=True)
print(answer.value)
43


Refer to the [docs](https://docs.prefect.io/latest/guides/variables/#accessing-variables) for more information and see the PR for implementation details: https://github.com/PrefectHQ/prefect/pull/12596

Other Enhancements 🌟
- Allow flows inside tasks
— https://github.com/PrefectHQ/prefect/pull/12559
— https://github.com/PrefectHQ/prefect/pull/12607
- Add `User-Agent` header containing the running Prefect version — https://github.com/PrefectHQ/prefect/pull/12601
- Adds deployment version to the flow run object — https://github.com/PrefectHQ/prefect/pull/12591

... and numerous 🐛 fixes!

**Full Changelog:** https://github.com/PrefectHQ/prefect/compare/2.16.9...2.17.0

See [the release notes](https://github.com/PrefectHQ/prefect/blob/main/RELEASE-NOTES.md#release-2170) for more!

2.16.9

This release includes a number of enhancements and in-flight feature work.

🛠✨ One such enhancement helps streamline our CLI by adding a `-jv/--job-variable` option to `prefect deploy`, on par with the option available in `prefect deployment run`.

🔄🔗 In terms of enhancing existing Prefect concepts, we've removed a constraint that prevented tasks from being called from other tasks. For example, this allows you to call tasks within tasks within a flow.

🗿 📉 We no longer create artifacts for unpersisted results, which should prevent an influx of entries to the `artifact` table. Retried flows without persisted results will now have an error message stating that the "State data is missing" rather than referencing an "unpersisted result".

See the [release notes](https://github.com/PrefectHQ/prefect/blob/main/RELEASE-NOTES.md#release-2169) for more details!

Page 2 of 44

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.