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

Agent Persistence #58

Merged
merged 31 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a4de2d4
Add migration for agent table creation
joshmeek Aug 18, 2020
ea3b011
Adjust agent table migration types and add update trigger
joshmeek Aug 18, 2020
8fed4c8
Remove TODO comment
joshmeek Aug 18, 2020
62ea75e
Add Agent model to ORM
joshmeek Aug 18, 2020
560cc48
Split out agent and agent run tables, add foreign key on flow_run to …
joshmeek Aug 21, 2020
6366132
Update ORM models
joshmeek Aug 21, 2020
a8af809
Add agent registration mutation and query update
joshmeek Aug 24, 2020
f63b3e5
Separate out Agent and AgentInstance models and add graphql routes
joshmeek Aug 24, 2020
8ce9184
Track agent instance ID with Submitted flow run states
joshmeek Aug 24, 2020
26f1087
Remove debug statements
joshmeek Sep 1, 2020
82d7654
Black formatting
joshmeek Sep 2, 2020
428b8c0
Add name field to Agent model
joshmeek Sep 2, 2020
82de2a9
Update last query time and move update logic to API function of getRu…
joshmeek Sep 2, 2020
d05b95c
Fix merge conflicts
joshmeek Sep 2, 2020
d727b0d
Update src/prefect_server/api/states.py
joshmeek Sep 2, 2020
a4f1fc2
Address comments from PR
joshmeek Sep 2, 2020
55a094e
Remove updated field from AgentInstance ORM
joshmeek Sep 2, 2020
ce64c43
Apply suggestions from code review
joshmeek Sep 2, 2020
4442b39
Import agent models from prefect.api.models
joshmeek Sep 2, 2020
d4ef6f2
Merge branch 'agent_persistence' of https://github.com/PrefectHQ/serv…
joshmeek Sep 2, 2020
cd14348
Refactor Agent/AgentInstance into AgentConfig/Agent
joshmeek Sep 3, 2020
5ebc6d9
Temporary file movement
joshmeek Sep 3, 2020
eb3fe78
Merge branch 'master' into agent_persistence
joshmeek Sep 3, 2020
317e85f
Recommit migration files
joshmeek Sep 3, 2020
b6c3a52
Remove references to agent_instance
joshmeek Sep 3, 2020
bfa2e60
Add update agent config mutation and change config field to settings
joshmeek Sep 4, 2020
397d545
Return false if flow run agent update unsuccessful
joshmeek Sep 4, 2020
3dce150
Black formatting
joshmeek Sep 4, 2020
c2dc75a
Fix hasura metadata migrations order
joshmeek Sep 4, 2020
9c71db8
Allow for empty name and settings to be passed to update_agent_config
joshmeek Sep 4, 2020
00de1a7
Add changes entry [ci skip]
joshmeek Sep 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 152 additions & 134 deletions services/hasura/migrations/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,236 +1,254 @@
functions:
- function:
name: downstream_tasks
schema: utility
- function:
name: upstream_tasks
schema: utility
version: 2
joshmeek marked this conversation as resolved.
Show resolved Hide resolved
tables:
- array_relationships:
- name: downstream_edges
using:
foreign_key_constraint_on:
column: upstream_task_id
table:
name: edge
schema: public
- name: task_runs
- table:
schema: public
name: agent
- table:
schema: public
name: agent_instance
object_relationships:
- name: agent
using:
foreign_key_constraint_on:
column: task_id
table:
name: task_run
schema: public
- name: upstream_edges
foreign_key_constraint_on: agent_id
array_relationships:
- name: flow_runs
using:
foreign_key_constraint_on:
column: downstream_task_id
column: agent_instance_id
table:
name: edge
schema: public
name: flow_run
- table:
schema: public
name: cloud_hook
- table:
schema: public
name: edge
object_relationships:
- name: downstream_task
using:
foreign_key_constraint_on: downstream_task_id
- name: flow
using:
foreign_key_constraint_on: flow_id
table:
name: task
- name: upstream_task
using:
foreign_key_constraint_on: upstream_task_id
- table:
schema: public
- array_relationships:
name: flow
object_relationships:
- name: flow_group
using:
foreign_key_constraint_on: flow_group_id
- name: project
using:
foreign_key_constraint_on: project_id
- name: tenant
using:
foreign_key_constraint_on: tenant_id
array_relationships:
- name: edges
using:
foreign_key_constraint_on:
column: flow_id
table:
name: edge
schema: public
name: edge
- name: flow_runs
using:
foreign_key_constraint_on:
column: flow_id
table:
name: flow_run
schema: public
name: flow_run
- name: tasks
using:
foreign_key_constraint_on:
column: flow_id
table:
name: task
schema: public
name: task
- table:
schema: public
name: flow_group
object_relationships:
- name: flow_group
using:
foreign_key_constraint_on: flow_group_id
- name: project
using:
foreign_key_constraint_on: project_id
- name: tenant
using:
foreign_key_constraint_on: tenant_id
table:
name: flow
schema: public
- array_relationships:
- name: flow_groups
array_relationships:
joshmeek marked this conversation as resolved.
Show resolved Hide resolved
- name: flows
using:
foreign_key_constraint_on:
column: tenant_id
column: flow_group_id
table:
name: flow_group
schema: public
- name: flows
name: flow
- table:
schema: public
name: flow_run
object_relationships:
- name: flow
using:
foreign_key_constraint_on: flow_id
- name: tenant
using:
foreign_key_constraint_on: tenant_id
array_relationships:
- name: logs
using:
foreign_key_constraint_on:
column: tenant_id
column: flow_run_id
table:
name: flow
schema: public
- name: projects
name: log
- name: states
using:
foreign_key_constraint_on:
column: tenant_id
column: flow_run_id
table:
name: project
schema: public
table:
name: tenant
schema: public
- array_relationships:
- name: flows
name: flow_run_state
- name: task_runs
using:
foreign_key_constraint_on:
column: flow_group_id
column: flow_run_id
table:
name: flow
schema: public
name: task_run
- table:
schema: public
name: flow_run_state
object_relationships:
- name: flow_run
using:
foreign_key_constraint_on: flow_run_id
- table:
schema: public
name: log
- table:
schema: public
name: message
- table:
schema: public
name: project
object_relationships:
- name: tenant
using:
foreign_key_constraint_on: tenant_id
table:
name: flow_group
schema: public
- array_relationships:
array_relationships:
- name: flows
using:
foreign_key_constraint_on:
column: project_id
table:
name: flow
schema: public
name: flow
- table:
schema: public
name: task
object_relationships:
- name: tenant
- name: flow
using:
foreign_key_constraint_on: tenant_id
table:
name: project
schema: public
- array_relationships:
- name: logs
foreign_key_constraint_on: flow_id
array_relationships:
- name: downstream_edges
using:
foreign_key_constraint_on:
column: flow_run_id
column: upstream_task_id
table:
name: log
schema: public
- name: states
name: edge
- name: task_runs
using:
foreign_key_constraint_on:
column: flow_run_id
column: task_id
table:
name: flow_run_state
schema: public
- name: task_runs
name: task_run
- name: upstream_edges
using:
foreign_key_constraint_on:
column: flow_run_id
column: downstream_task_id
table:
name: task_run
schema: public
name: edge
- table:
schema: public
name: task_run
object_relationships:
- name: flow
- name: flow_run
using:
foreign_key_constraint_on: flow_id
foreign_key_constraint_on: flow_run_id
- name: task
using:
foreign_key_constraint_on: task_id
- name: tenant
using:
foreign_key_constraint_on: tenant_id
table:
name: flow_run
schema: public
- array_relationships:
array_relationships:
- name: logs
using:
foreign_key_constraint_on:
column: task_run_id
table:
name: log
schema: public
name: log
- name: states
using:
foreign_key_constraint_on:
column: task_run_id
table:
name: task_run_state
schema: public
name: task_run_state
- table:
schema: public
name: task_run_state
object_relationships:
- name: flow_run
using:
foreign_key_constraint_on: flow_run_id
- name: task
using:
foreign_key_constraint_on: task_id
- name: tenant
- name: task_run
using:
foreign_key_constraint_on: tenant_id
table:
name: task_run
foreign_key_constraint_on: task_run_id
- table:
schema: public
- object_relationships:
- name: downstream_task
using:
foreign_key_constraint_on: downstream_task_id
- name: flow
name: tenant
array_relationships:
- name: flow_groups
using:
foreign_key_constraint_on: flow_id
- name: upstream_task
foreign_key_constraint_on:
column: tenant_id
table:
schema: public
name: flow_group
- name: flows
using:
foreign_key_constraint_on: upstream_task_id
table:
name: edge
schema: public
- object_relationships:
- name: flow_run
foreign_key_constraint_on:
column: tenant_id
table:
schema: public
name: flow
- name: projects
using:
foreign_key_constraint_on: flow_run_id
table:
name: flow_run_state
schema: public
- object_relationships:
foreign_key_constraint_on:
column: tenant_id
table:
schema: public
name: project
- table:
schema: utility
name: traversal
object_relationships:
- name: task
using:
manual_configuration:
column_mapping:
task_id: id
remote_table:
name: task
schema: public
table:
name: traversal
name: task
column_mapping:
task_id: id
functions:
- function:
schema: utility
- object_relationships:
- name: task_run
using:
foreign_key_constraint_on: task_run_id
table:
name: task_run_state
schema: public
- table:
name: cloud_hook
schema: public
- table:
name: log
schema: public
- table:
name: message
schema: public
version: 2
name: downstream_tasks
- function:
schema: utility
name: upstream_tasks
Loading