Skip to content

Commit 5570cd3

Browse files
zaniebpleek91Terrence DorseyAndrew Brookinszangell44
authored
Publish code from Orion release 2.0a8 (#5318)
* Use a more realistic mock version * Add debug print on failed assertion * build with types * Fix test * Ensure version is correct during test runs by doing a deep fetch * Remove unused threading lock * Fixup comment * Types working with a little hacking * Return failed exit codes correctly * Update vue-compositions * Edits to installation and first steps tutorial, including updated UI image. * Flow and task configuration edits and examples. * Bundle everything in the components folder * Task dependencies edits and examples. * Orchestration components edits. * FAQ edits. * Fix some type errors * Export radar nodes * Remove name filter * Add flow_id and task_id sorting options * WIP on filters for read logs API * Use flow run and task run IDs for logs * Use flow_run_id, task_run_id in Log schema * Use task run and flow run IDs for logs API * format with black * Add offset, empty case log API tests * Update src/prefect/orion/database/interface.py Co-authored-by: Mariia Kerimova <[email protected]> * Add LogFilter tests * Remove unused imports * Use `schema.dict()` for comparisons so pytest reports accurate diffs * Add check for `minItems` and `maxItems` for Pydantic 1.9.0+ * fix docs bug * Use array response for logs, bulk insert * WIP * Update `State.__str__` to only include type if meaningful and drop "message=" * Remove some experimental code * Cleanup * Allow kwargs to be passed to `run_logger` * Update `run_logger` docstring * Use `send_to_orion`; drop `Flow/Task` loggers * Update docs/getting-started/installation.md Co-authored-by: Chris White <[email protected]> * Drop extraneous stuff from logging config * Update context tests * Update docs/tutorials/orion.md * Fixup more tests * Fix logging for crashes * Positional-only parameters is py3.8+ only * Restore simple log format * Simplify retrieval of parent logger * Fixup context test * Fixup output tests * Test sorting logs API * Fix log schema field descriptions * Remove now-unused Logs schema * Format with black * Update docs/index.md Co-authored-by: Michael Adkins <[email protected]> * Add tests for run logger retrieval * Review feedback * Remove now-unused test helper * Fix bundle error with vite Not 100% sure why this is happening but using `any` here makes it stop erroring * Implement `OrionHandler` * Add `create_logs` to `OrionClient` and pass `dicts` around instead of `Log` We cannot use `Log` because we need `LogCreate` objects to be passed to the API. Using `LogCreate` outside of the `Client` feels weird * Fix note in handler * Fix bare except * Switch back to `LogCreate` for better error handling * Fix `getsizeof` call * Add error handlers * Minor fixups * Deployments overview and UI image. * Add handling when `pending_logs` is empty * Deployment specification * Deployment registration * Running deployments * Deployment example * Make inject_db async-aware * Add log models tests * Remove unnecessary uses of inject_db * Misc formatting * Use exc_info * Do not emit records if `send_to_orion` is `False * Fix context loading; add tests for `OrionHandler` * Update miter to latest version * Move `prefect flow-run create` to `prefect deployment run` * Add 3.9+ workaround; add `OrionHandler.flush` * Expand on regression test description * Clean up stale docs * Privatize `OrionLogWorker` * Use a le, ge filter for log level * Fix tests * Fix bug where envion could be left modified if settings failed validation * Set log interval to float so it can be fast in tests * Add single log max size setting * Add `read_logs` support to `OrionClient` * Pass serialized logs to the `OrionLogWorker` for easier size checking * Add test for single log size max * Fixup comment * Add rudimentary docstrings to client * Update references to engine logger * Rename to `get_run_logger()` * Use a worker fixture to ensure shutdown * Flush logs when a root flow run completes * Remove unused imports * Remove some more unused imports * Rewriting based on review feedback. * Reset the OrionHandler as a global fixture; add flow and task run integration tests * Add logging fixtures file * Further revsions and reorganizing topics. * Refactor `OrionHandler` logging settings and add global toggle * Disable OrionHandler by default during tests and allow enable with a mark * Add docstring * Fix mispelling of "Cancelled" state in UI * Implement OrionAdapter for preserving extra fields * Update src/prefect/utilities/logging.py Co-authored-by: Michael Adkins <[email protected]> * Update docs/concepts/deployments.md Co-authored-by: Bill Palombi <[email protected]> * Update docs/concepts/deployments.md Co-authored-by: Bill Palombi <[email protected]> * Update docs/concepts/deployments.md Co-authored-by: Bill Palombi <[email protected]> * Rename to `PrefectLogAdapter` because it is not Orion specific * Link to Python issue * Move `logging.yml` to new logging module * Move logging into separate modules at 'prefect.logging' * Remove deferred imports * Move logging tests up a level * Update manfiest and docs for move * Remove old logging module * Add `JsonFormatter` docstring * Add more docstrings * Move `AsyncMock` from compat to testing utility module This allows us to drop the try/except import which felt weird. Things that are only used for testing belong in the testing utils module. * Update miter to latest version * Use an event instead instead of sleep to reduce brittleness * Update docs/concepts/deployments.md Co-authored-by: Michael Adkins <[email protected]> * Update docs/concepts/deployments.md Co-authored-by: Michael Adkins <[email protected]> * Update docs/concepts/deployments.md Co-authored-by: Michael Adkins <[email protected]> * Update docs/concepts/deployments.md Co-authored-by: Michael Adkins <[email protected]> * Update docs/concepts/deployments.md Co-authored-by: Michael Adkins <[email protected]> * Revised description of ways to create deployment specs. * Enable services by default with `prefect orion start` * Revise options for deployment creation. * Add flow runner concepts * Add blurb for `FlowRunnerSettings` * Fix universal flow runner import * Add tutorial * Fix `prefect deployment run` command This command was not updated when the client interface changed * Add note about custom image requirement * Add `FROM` recommendation * Whitespace changes * Fix `prefect deployment run` command This command was not updated when the client interface changed * Add virtual environments tutorial * Add venv tutorial to flow-runners concepts * Update header * Flow runner doc edits. * Add flow run docs to nav. * Only schedule with the scheduler * Change router watchers to better reflect component lifecycle * Update docs/concepts/flow-runners.md Co-authored-by: Chris White <[email protected]> * Update docs/concepts/flow-runners.md Co-authored-by: Chris White <[email protected]> * Update docs/tutorials/docker-flow-runner.md Co-authored-by: Chris White <[email protected]> * Update docs/tutorials/docker-flow-runner.md Co-authored-by: Chris White <[email protected]> * Feedback from review * Minor edits based on feedback. * Update bash examples, removing prompts. * Revise explanation of flow runner operation. * Additional revisions based on feedback. * Additional revision based on feedback. * Minor code revisions. * Revise using a flow runner. * Only retain python test docker images for 1 day The default retention of 90 days is expensive if we build 3 images for every PR commit * Use consistent casing for "task" * Rename file name for clarity * Add CODEOWNERS * Add Dustin * Add Zach and Andrew as Orion server owners * Remove unecesssary conditional It does the same evaluation as the while loop check, oops. * Remove `=`, allows logs to be too big * Disable caching for date_add * Fix release PR to the public repository by resolving merge conflicts automatically * Pull docker image before we create a container * Add release notes for 2.0a8 * Add image pull policy to Docker flow runner * Improve mocking hygiene * Update release notes for implementation in #810 * Add log on image pull * Use the string repr * Use `AutoEnum` and move from orion to prefect utilities * Fixup autoenum usage * Update docs * Update discussion of flow runner types and default flow runners. * Restore circleci config * Drop welcome orb * Minimal circle config? * Remove filter * Fixup job name * Set the asyncio mode to auto * Fix pytest-asyncio failures; increase lower bound since we rely on auto now See pytest-dev/pytest-asyncio#257 Co-authored-by: Craig Harshbarger <[email protected]> Co-authored-by: Terrence Dorsey <[email protected]> Co-authored-by: Andrew Brookins <[email protected]> Co-authored-by: Zach Angell <[email protected]> Co-authored-by: Chris White <[email protected]> Co-authored-by: Andrew Brookins <[email protected]> Co-authored-by: Mariia Kerimova <[email protected]> Co-authored-by: Anna Geller <[email protected]> Co-authored-by: Terrence Dorsey <[email protected]> Co-authored-by: Zach Angell <[email protected]> Co-authored-by: Bill Palombi <[email protected]> Co-authored-by: nicholas <[email protected]> Co-authored-by: Nicholas Brown <[email protected]>
1 parent 1d57271 commit 5570cd3

File tree

238 files changed

+17517
-2541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+17517
-2541
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2.1
22

3-
orbs:
4-
welcome: circleci/[email protected]
3+
jobs:
4+
build: # must be called 'build' if not using a workflow
5+
docker:
6+
- image: alpine:latest
57

6-
workflows:
7-
welcome:
8-
jobs:
9-
- welcome/run
8+
steps:
9+
- run: echo "looks good to me!"

.flake8

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1-
# global owners
2-
* @madkinsz @zangell44
1+
# global
2+
* @madkinsz
3+
4+
# release
5+
/.github/workflows/release.yaml @cicdw
6+
7+
# orion server
8+
/src/prefect/orion @zangell44 @madkinsz @abrookins
9+
10+
# ui
11+
/orion-ui @pleek91
12+
13+
# documentation
14+
/docs @tpdorsey
15+
16+
# orchestration rules / policies
17+
/src/prefect/orion/orchestration @anticorrelator
18+
19+
# database configuration / models
20+
/src/prefect/orion/database @anticorrelator

.github/ISSUE_TEMPLATE/1. bug_report.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/2. enhance-a-feature.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
16
version: 2
27
updates:
3-
- package-ecosystem: pip
4-
directory: "/"
5-
schedule:
6-
interval: weekly
7-
day: saturday
8-
time: "04:00"
9-
timezone: America/New_York
10-
open-pull-requests-limit: 10
11-
rebase-strategy: disabled
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

0 commit comments

Comments
 (0)