Skip to content

Conversation

BriannaRoskind
Copy link
Contributor

@BriannaRoskind BriannaRoskind commented Jun 16, 2021

Summary:
Generated Feature Group controller code and wrote passing integration tests for the Feature Group controller.

Files Added:

  • test/e2e/tests/test_feature_group.py - Contains Create and Delete integration test for feature group
  • test/e2e/resources/feature_group.yaml - yaml file for feature group creation in integration testing.
  • pkg/resource/feature_group/custom_delta.go - Sets default spec values for feature group fields (DisableGlueTableCreation and S3StorageConfig) if the user did not define them.

Files Edited:

  • test/e2e/service_bootstrap.py - Attached AmazonSageMakerFeatureStoreAccess Role Policy to the SageMaker Execution Role for testing purposes. (Feature Store requires this permission for the Feature Group creation and access)
  • generator.yaml - Commented out feature group from the ignore list. Also added feature group exceptions, hooks, and fields.
  • pkg/resource/feature_group/delta.go - added the CustumSetDefault() function from custom_delta.go to the newResourceDelta() function.

@ack-bot
Copy link
Collaborator

ack-bot commented Jun 16, 2021

Hi @BriannaRoskind. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ack-bot ack-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 16, 2021
Ubuntu added 2 commits June 16, 2021 19:36
…the Feature Group DeleteFailed state after the delete requeue PR is merged.
Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BriannaRoskind I believe you forgot to git add pkg/resource/featuregroup/ :) In addition, please do remember to write a full PR description and summary message.

Thanks!
-jay

@BriannaRoskind BriannaRoskind requested a review from jaypipes June 16, 2021 20:11
…eation and S3StorageConfig by creating a custom_delta.go file. This sets their default values if the user did not specify them, and it is called via the delta_pre_compare hook (added in generator.yaml).

// A group of versioned models in the model registry.
type ModelPackageGroup struct {
CreationTime *metav1.Time `json:"creationTime,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the CreationTime field has been added to a whole bunch of resources and type definitions... is this because you are using a new(er) version of aws-sdk-go to build the sagemaker-controller? If so, it would be best to regenerate the sagemaker-controller with that new aws-sdk-go version but without adding the new FeatureGroup resource. That way, we can isolate the changes in this PR to only those introduced due to the new FeatureGroup resource. Make sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The funny thing is... I don't actually see a change to the go.mod file in this PR... @BriannaRoskind did you happen to regenerate the sagemaker-controller and pass in a specific aws-sdk-go version to generate the controller with but forgot to change the go.mod file in the sagemaker-controller repo?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 please check this out. types unrelated to this resources are getting added like ModelPackage and Notebook

# time out errors at a 10 second wait period.
_, deleted = k8s.delete_custom_resource(reference, 3, 15)
assert deleted
# TODO: Once the delete requeue PR is merged,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which PR is the above referring to? :)

Copy link
Member

@surajkota surajkota Jun 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@surajkota surajkota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments.
Were you planning to create a separate PR to handle requeueOnCreate until Created?

You can also handle long-running delete like in here - https://github.com/aws-controllers-k8s/elasticache-controller/pull/34/files


// A group of versioned models in the model registry.
type ModelPackageGroup struct {
CreationTime *metav1.Time `json:"creationTime,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 please check this out. types unrelated to this resources are getting added like ModelPackage and Notebook

generator.yaml Outdated
- IncompleteSignature
- MissingAuthenticationToken
- NotAuthorized
- ValidationError
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed remove the auth related errors and ValidationError from terminal. Validation mainly because I have seen SM service wrap a lot of different error under this and we cant be sure if all of them are terminal. Auth related because these can be corrected without changing the resource itself

generator.yaml Outdated
fields:
FailureReason:
is_read_only: true
is_printable: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update code gen and use new format aws-controllers-k8s/code-generator#82

}
}

// ResolvedOutputS3URI has a timestamped generated default value, it cannot be null.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it cannot be null is a bit confusing, IMO you can remove these words and the meaning of the sentence will remain same

RoleName=role_name, PolicyArn="arn:aws:iam::aws:policy/AmazonS3FullAccess"
)
# This policy accommodates use of the feature group controller.
iam.attach_role_policy(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you check what is present in this policy that is not in SagemakerFullAccess?

# time out errors at a 10 second wait period.
_, deleted = k8s.delete_custom_resource(reference, 3, 15)
assert deleted
# TODO: Once the delete requeue PR is merged,
Copy link
Member

@surajkota surajkota Jun 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k8s.get_resource_arn(resource)
== get_sagemaker_feature_group(feature_group_name)["FeatureGroupArn"]
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add check for created status

Ubuntu and others added 4 commits June 24, 2021 18:42
… we still see the ACK.Recoverable Condition being set alternatingly to true/false.
…print format, and removed authorization related errors from the terminal_codes of feature group.
…in test_feature_group.py, but the test file has not yet been tested.
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 25, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BriannaRoskind
To complete the pull request process, please assign vijtrip2 after the PR has been reviewed.
You can assign the PR to them by writing /assign @vijtrip2 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Ubuntu added 2 commits June 28, 2021 14:41
…est version with wait for Completing status.
… status before asserting we have reached Created status.
@BriannaRoskind BriannaRoskind deleted the branch aws-controllers-k8s:main June 28, 2021 18:55
@BriannaRoskind BriannaRoskind deleted the main branch June 28, 2021 18:55
@BriannaRoskind BriannaRoskind restored the main branch June 28, 2021 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants