Skip to content
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

Consider updating SetPortableClassItems() logic for panics #787

Closed
hasheddan opened this issue Sep 12, 2019 · 2 comments
Closed

Consider updating SetPortableClassItems() logic for panics #787

hasheddan opened this issue Sep 12, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@hasheddan
Copy link
Member

What problem are you facing?

The SetPortableClassItems() method was required on all portable ___ClassList objects following crossplane/crossplane-runtime#13. Implementation consisted of ignoring objects that were not the correct type for the class list's items:

// SetPortableClassItems of this RedisClusterClassList.
func (rc *RedisClusterClassList) SetPortableClassItems(r []resource.PortableClass) {
	items := make([]RedisClusterClass, len(r))
	for i, item := range r {
		if rcItem, ok := item.(*RedisClusterClass); ok {
			items[i] = *rcItem
		}
	}
	rc.Items = items
}

How could Crossplane help solve your problem?

It is not clear that this is the desired behavior for this method. Alternatives were proposed by @negz in comment.

@hasheddan hasheddan added the enhancement New feature or request label Sep 12, 2019
@negz
Copy link
Member

negz commented Sep 30, 2019

If crossplane-contrib/provider-gcp#39 and friends are merged this change will need to be made as part of angryjet, which would generate these methods.

@hasheddan
Copy link
Member Author

Portable classes no longer exist so this issue is no longer needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants