Skip to content

Conversation

@danehans
Copy link
Contributor

Previously, an AWS provider would be used without validating that clients could communicate with associated API endpoints. This PR adds validation by ensuring each AWS provider client can make a list/describe API call.

/assign @Miciah @knobunc
/cc @frobware @sgreene570

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Sep 12, 2020
@openshift-ci-robot
Copy link
Contributor

@danehans: This pull request references Bugzilla bug 1866299, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, ON_DEV, POST, POST, but it is ON_QA instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

Bug 1866299: Refactors AWS Provider Validation

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 12, 2020
@danehans
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 12, 2020
@openshift-ci-robot
Copy link
Contributor

@danehans: This pull request references Bugzilla bug 1866299, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Sep 12, 2020
@danehans
Copy link
Contributor Author

level=error msg="Cluster operator machine-config Degraded is True with MachineConfigControllerFailed: Unable to apply 4.6.0-0.ci.test-2020-09-12-235633-ci-op-kk4xnx01: timed out waiting for the condition during waitForControllerConfigToBeCompleted: controllerconfig is not completed: status for ControllerConfig machine-config-controller is being reported for 0, expecting it for 1"

/test e2e-aws

Copy link
Contributor

@Miciah Miciah left a comment

Choose a reason for hiding this comment

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

Just a couple minor suggestions. This looks like a good approach.

// validateServiceEndpoints validates that provider clients can communicate
// with associated API endpoints by each making a list/describe/get call.
func validateServiceEndpoints(provider *Provider) error {
if provider.route53 != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can provider.route53, provider.elb, provider.elbv2, or provider.tags ever be nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not the way it's being called from NewProvider() today. I'll update to remove the nil check.

return fmt.Errorf("failed to get group tagging resources: %v", err)
}
}
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of validating all endpoints, accumulating errors, and returning the result at the end? Something like this:

 	var errs []error
	if _, err := ...; err != nil {
		errs = append(errs, fmt.Errorf(...))
	}
	if _, err := ...; err != nil {
		errs = append(errs, fmt.Errorf(...))
	}
	if _, err := ...; err != nil {
		errs = append(errs, fmt.Errorf(...))
	}
	if _, err := ...; err != nil {
		errs = append(errs, fmt.Errorf(...))
	}
	return kerrors.NewAggregate(errs)

(If errs is empty, kerrors.NewAggregate(errs) returns nil.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes I like that approach. Let me update.

@danehans danehans force-pushed the bz1866299_update_validation branch from 264e632 to ddc335f Compare September 14, 2020 15:52
@danehans
Copy link
Contributor Author

@Miciah commit ddc335f implements your feedback. Thanks for the review!

@danehans
Copy link
Contributor Author

2020/09/14 17:37:09 pod didn't start running within 10 minutes: 
* Container artifacts is not ready with reason PodInitializing and message 
* Container test is not ready with reason PodInitializing and message 

/test e2e-aws

@Miciah
Copy link
Contributor

Miciah commented Sep 14, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 14, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danehans, Miciah

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

The pull request process is described here

Details 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

@openshift-merge-robot openshift-merge-robot merged commit e85155e into openshift:master Sep 14, 2020
@openshift-ci-robot
Copy link
Contributor

@danehans: All pull requests linked via external trackers have merged:

Bugzilla bug 1866299 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1866299: Refactors AWS Provider Validation

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants