<#7000 [V2] Add project service> Pull request open...
# flyte-github
a
#7000 [V2] Add project service Pull request opened by machichima Tracking issue Why are the changes needed? Add project service. What changes were proposed in this pull request? • Add project service under
runs/service/project_service.go
and store project info to DB (project model:
runs/repository/models/project.go
) • Add string filter in
runs/repository/impl/string_filters.go
to deal with the filter with form
value_in(state,0;1;2)
, which is used by
ListProjects
request • Add
Domains
into run service config, this will be inject into project service response • Add test scripts under
runs/test/scripts/
for testing project service behavior How was this patch tested? • unit test • Start local sandbox and run test scrips locally # Create project ❯ PROJECT_ID=testproject-1773125257 bash runs/test/scripts/create_project.sh {} # Update project (state to archived) ❯ env PROJECT_ID=testproject-1773125257 STATE=PROJECT_STATE_ARCHIVED bash runs/test/scripts/update_project_status.sh {} # Get project ❯ PROJECT_ID=testproject-1773125257 runs/test/scripts/get_project.sh { "project": { "id": "testproject-1773125257", "name": "Test Project", "domains": [ { "id": "development", "name": "Development" }, { "id": "production", "name": "Production" } ], "description": "Project created from script", "labels": { "values": { "team": "runs" } }, } } # List project (with filter) ❯ FILTERS='value_in(state,0;1)' bash runs/test/scripts/list_projects.sh { "projects": { "projects": [ { "id": "testproject", "name": "Test Project", "domains": [ { "id": "development", "name": "Development" }, { "id": "production", "name": "Production" } ], "description": "Project created from script", "labels": { "values": { "team": "runs" } } }, { "id": "testproject-1773125257", "name": "Test Project", "domains": [ { "id": "development", "name": "Development" }, { "id": "production", "name": "Production" } ], "description": "Project created from script", "labels": { "values": { "team": "runs" } }, "state": "PROJECT_STATE_ARCHIVED" } ] } } Labels Please add one or more of the following labels to categorize your PR: • added: For new features. • changed: For changes in existing functionality. • deprecated: For soon-to-be-removed features. • removed: For features being removed. • fixed: For any bug fixed. • security: In case of vulnerabilities This is important to improve the readability of release notes. Setup process Screenshots Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. Related PRs Docs link •
main
• #6583 • #7000 👈 flyteorg/flyte