Skip to content

Conversation

@sutaakar
Copy link
Contributor

@sutaakar sutaakar commented Sep 13, 2023

Issue link

Intention is to align AppWrappers function with AppWrapper, so result of both functions can be used in transforming functions.

What changes have been made

AppWrappers function now returns slice of pointers on AppWrapper instead of slice of structs.

Verification steps

Tested in ODH DW tests.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change


awsp := []*mcadv1beta1.AppWrapper{}
for _, v := range aws.Items {
awsp = append(awsp, &v)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be:

for i, v := range aws.Items {
	v := v
	awsp = append(awsp, &v)

See golang/go#56010

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, thanks for pointing it out.
I completely forgot on this "feature".

@astefanutti
Copy link
Contributor

/lgtm

@astefanutti
Copy link
Contributor

/approve

@openshift-ci
Copy link

openshift-ci bot commented Sep 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: astefanutti

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:

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 526bb53 into project-codeflare:main Sep 13, 2023
@sutaakar sutaakar deleted the structs branch September 13, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants