Skip to content

Refactor e2e deletion and unmark adopted Endpoint Test #216

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

Merged
merged 6 commits into from
Mar 21, 2023

Conversation

ryansteakley
Copy link
Member

Issue #, if available:

Description of changes:
Disabling the adopted endpoint test as canary since this does not provide value for a canary, will keep as e2e test. Refactors

if k8s.get_resource_exists(reference): 
 _, deleted = k8s.delete_custom_resource(reference, cfg.JOB_DELETE_WAIT_PERIODS, cfg.JOB_DELETE_WAIT_LENGTH) 
> assert deleted 

into a shared method, and adds a retry loop for this assert.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ryansteakley ryansteakley requested a review from surajkota as a code owner March 17, 2023 21:56
@ack-prow ack-prow bot requested review from a-hilaly and rd-pong March 17, 2023 21:56
@ack-prow ack-prow bot added the approved label Mar 17, 2023
deleted = True

if k8s.get_resource_exists(reference):
_, deleted = k8s.delete_custom_resource(reference, wait_period*2, wait_length)
Copy link
Member

Choose a reason for hiding this comment

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

nit: lets double the value of the constant or at the passing method to keep the method generic

lets use cfg.DELETE_WAIT_PERIOD, cfg.DELETE_WAIT_LENGTH for the ones with 3, 10? similar to job

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 misses

assert deleted


assert delete_custom_resource(reference, DELETE_WAIT_PERIOD, DELETE_WAIT_LENGTH)
Copy link
Member

Choose a reason for hiding this comment

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

incorrect indent

)
assert deleted

assert delete_custom_resource(reference, DELETE_WAIT_PERIOD, DELETE_WAIT_LENGTH)
Copy link
Member

Choose a reason for hiding this comment

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

incorrect indent

assert deleted


assert delete_custom_resource(reference, DELETE_WAIT_PERIOD, DELETE_WAIT_LENGTH)
Copy link
Member

Choose a reason for hiding this comment

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

incorrect indent

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.

/approve
/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2023
@ack-prow
Copy link

ack-prow bot commented Mar 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ryansteakley, surajkota

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [ryansteakley,surajkota]

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

@ack-prow ack-prow bot merged commit 4584219 into aws-controllers-k8s:main Mar 21, 2023
ryansteakley added a commit to ryansteakley/sagemaker-controller that referenced this pull request Mar 21, 2023
…rs-k8s#216)

Issue #, if available:

Description of changes:
Disabling the adopted endpoint test as canary since this does not provide value for a canary, will keep as e2e test. Refactors  
```
if k8s.get_resource_exists(reference): 
 _, deleted = k8s.delete_custom_resource(reference, cfg.JOB_DELETE_WAIT_PERIODS, cfg.JOB_DELETE_WAIT_LENGTH) 
> assert deleted 
```
into a shared method, and adds a retry loop for this assert.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
ack-prow bot pushed a commit that referenced this pull request Mar 21, 2023
) (#219)

Issue #, if available:

Description of changes:
Disabling the adopted endpoint test as canary since this does not provide value for a canary, will keep as e2e test. Refactors  
```
if k8s.get_resource_exists(reference): 
 _, deleted = k8s.delete_custom_resource(reference, cfg.JOB_DELETE_WAIT_PERIODS, cfg.JOB_DELETE_WAIT_LENGTH) 
> assert deleted 
```
into a shared method, and adds a retry loop for this assert. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
ryansteakley added a commit that referenced this pull request Mar 22, 2023
ryansteakley added a commit to ryansteakley/sagemaker-controller that referenced this pull request Jan 19, 2024
…rs-k8s#216)

Issue #, if available:

Description of changes:
Disabling the adopted endpoint test as canary since this does not provide value for a canary, will keep as e2e test. Refactors  
```
if k8s.get_resource_exists(reference): 
 _, deleted = k8s.delete_custom_resource(reference, cfg.JOB_DELETE_WAIT_PERIODS, cfg.JOB_DELETE_WAIT_LENGTH) 
> assert deleted 
```
into a shared method, and adds a retry loop for this assert.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants