-
Notifications
You must be signed in to change notification settings - Fork 356
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
feat: Generic Tasks #8724
feat: Generic Tasks #8724
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
master/static/migrations/20231213121945_add-task-config.tx.up.sql
Outdated
Show resolved
Hide resolved
master/static/migrations/20231213132456_add-parent-id-task-config.tx.up.sql
Outdated
Show resolved
Hide resolved
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8724 +/- ##
==========================================
- Coverage 47.84% 47.69% -0.16%
==========================================
Files 1061 1065 +4
Lines 168144 169636 +1492
Branches 2238 2238
==========================================
+ Hits 80447 80901 +454
- Misses 87539 88577 +1038
Partials 158 158
Flags with carried forward coverage won't be shown. Click here to find out more.
|
master/static/migrations/20231108114423_create-generic-tasks.tx.up.sql
Outdated
Show resolved
Hide resolved
Co-authored-by: Ilia Glazkov <[email protected]>
then you can't reuse them for a manual test. |
I don't think these particular fixtures offer enough to be useful to a manual test. |
they're better than nothing, and one can extend them as needed: rather than creating something from scratch every time, or having a stashed example somewhere, I can alternatively, what place do we have where we can put an example that is too experimental for an end user? |
I would argue these fixtures are not better than nothing, because they're so thin. I would have to go read the test to even locate where the fixture is, and then read the test to figure out how it would be called. I'd have to mentally convert the SDK and read_context calls into their CLI equivalents. I wouldn't do that, I'd just Not to mention that eliminating the fixtures will actually simplify the tests being written here. There's no good reason why these any of these tests need to be reading contexts manually in the first place. I'm not arguing against all fixtures. But I do think if you can easily replace the fixture with inline strings then that's an indication the fixture isn't sophisticated enough to justify the fixture.
Don't we have an unsupported experiments repo now? I'm not sure I see the relevance of that question to the conversation though. |
you can send a link to someone pointing to the fixture directory, and they can file fixture can be reused. synthetic FileTrees in the tests is strictly confined to the test, and extracting them will take 20 minutes. if you have only 2 static fixtures, not 25 combinations generated on the fly, I do not see the appeal.
The feature must have at least some usable example we can put somewhere. This fixture was supposed to be this example. I am not sure the new examples repo is an appropriate place for "experimental" stuff but I am fine using it. |
It sounds like we are not going to agree on the value of tiny fixtures. But this isn't a hill I want to die on.
Ok, a fixture is a reasonable solution to meet these constraints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e2e tests look good
…ned into generic-task-final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stamp since ryan and ilia reviewed also (also i think i reviewed every commit in this as it landed into the feature branch)
* Create Generic Task * Get Task Config * Fork Task * Create Child Task * small fix * fix fork tree merge * Kill task * fix kill merge * remove duplicates * fix slots * error for non-generic tasks * fix bindings and kill call * Pause & Resume Tasks * pause/resume merge fixes * bindings clean build * Apply suggestions from code review Co-authored-by: Ilia Glazkov <[email protected]> * remove duplicate test * unify migrations * formatting * hide from -h * pause -> unpause * Create Generic Task * Get Task Config * Fork Task * Create Child Task * small fix * fix fork tree merge * Kill task * fix kill merge * remove duplicates * fix slots * error for non-generic tasks * fix bindings and kill call * Pause & Resume Tasks * pause/resume merge fixes * bindings clean build * remove duplicate test * unify migrations * Apply suggestions from code review Co-authored-by: Ilia Glazkov <[email protected]> * formatting * hide from -h * pause -> unpause * fix single node check and naming * fix injection * lint + test fixes * fixes * no pause in task.py * go lint * add e2e test for generic tasks * isort test * fix test * shorten test task run time * single node default true in api_command * move to Bun * fix pb * lint migrations * fix missing order by * fix intg test * Apply suggestions from code review Co-authored-by: Ilia Glazkov <[email protected]> * fix merge * fix style * add task state check * fix comment * update migrations * fix todo * remove action for get task config * update e2e test * reduce test fixture time * remove run python file * add completion tests * fix imports * test lint * update tests * fix api.ts conflict * send dummy job for generic tasks * set weight * lint migrations * implement v1Job --------- Co-authored-by: Ilia Glazkov <[email protected]>
Description
Creating Generic Tasks API, part of Project Modular Execution. Includes expansion of task CLI to include the following commands:
create <config file> [--context CONTEXT] [-i INCLUDE] [--project_id PROJECT_ID] [--config CONFIG] [-f] [--fork FORK] [-p PARENT] [--inherit_context]
config <task id> [--json ]
fork <parent task id> [--project_id PROJECT_ID]
kill <task id> [--root]
pause <task id>
unpause <task id>
Test Plan
Create Task
Ex:
Get Config
Fork Task
$ det task create e2e_tests/tests/fixtures/generic_task/test_config.yaml --context e2e_tests/tests/fixtures/generic_task
> created task <task-id>
$ det task create e2e_tests/.../test_config.yaml --context e2e_tests/.../generic_task e2e_tests --fork <task-id>
> created task <forked-task-id>
$ det task logs <forked-task-id>
Kill Task
$ det task create e2e_tests/tests/fixtures/generic_task/test_config.yaml --context e2e_tests/tests/fixtures/generic_task
> created task <task-id>
$ det task kill <task-id>
> Successfully killed task: <task-id>
Pause & Unpause Task
$ det task create e2e_tests/tests/fixtures/generic_task/test_config.yaml --context e2e_tests/tests/fixtures/generic_task
> created task <task-id>
$ det task pause <task-id>
> Successfully paused task: <task-id>
$ det task logs -f
$ det task unpause <task-id>
> Successfully unpaused task: <task-id>
$ det task logs -f
Checklist
docs/release-notes/
.See Release Note for details.
Ticket
DET-9945
DET-9986
DET-9987
DET-10016
DET-10017
DET-10002
DET-10102
DET-10052
DET-10093