Commit 41a85fd
authored
Notebook Instance (Create/Delete) test (#56)
This is a pull request for the Notebook Instance, this PR contains code that will enable the creation/deletion of Notebook Instances with ACK.
Create operation: Creates a notebook instance and sets the resource synced status to false until the NotebookInstance reaches the InService state(custom_set_output.go). Also fills in any unfilled values to prevent an update after creation(custom_set_delta.go).
Delete Operation: Stops the notebook instance and deletes it. Notebook has to be in the “Stopped” state in order for it to be deleted.
Integration test checks if creation/deletion are working correctly.
Custom code:
pkg/resource/notebook_instance/custom_sdk_api.go : File containing functions that call the sagemaker API
pkg/resource/notebook_instance/custom_set_delta.go : Fills in default values to prevent an update after creation
pkg/resource/notebook_instance/hooks.go: Handles re queuing and setting resource synced conditions.
templates/notebook_instance/sdk_delete_pre_build_request.go.tpl : Stops the notebook and re queues on any state other than Stopped/Failed.
Integration test files:
test/e2e/resources/notebook_instance.yaml : Resource spec used for test.
test/e2e/tests/test_notebook_instance.py : Integration test for notebook, creates and deletes the notebook and verifies that states were synced.1 parent 9943ca3 commit 41a85fd
File tree
25 files changed
+2438
-15
lines changed- apis/v1alpha1
- cmd/controller
- config
- crd
- bases
- rbac
- pkg/resource/notebook_instance
- templates/notebook_instance
- test/e2e
- resources
- tests
25 files changed
+2438
-15
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
624 | 674 | | |
625 | 675 | | |
626 | 676 | | |
| |||
689 | 739 | | |
690 | 740 | | |
691 | 741 | | |
692 | | - | |
| 742 | + | |
693 | 743 | | |
694 | 744 | | |
695 | 745 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments