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

refactor(orc8r): Remove proto.Clone calls #14029

Merged

Conversation

MoritzThomasHuebner
Copy link
Contributor

@MoritzThomasHuebner MoritzThomasHuebner commented Sep 28, 2022

Closes #13698

Summary

  • Replaced proto.Clone calls from the orc8r by passing references.
  • Added some missing commas to comments.
  • Changed empty slice creation using literals to nil slice declaration.

Test Plan

Run unit tests.

Additional Information

The remaining uses of proto.Clone in the orc8r are necessary.

I also checked occurrences of proto.Clone in the FeG, but these all appear to be required.

  • This change is backwards-breaking

@pull-request-size pull-request-size bot added the size/L Denotes a Pull Request that changes 100-499 lines. label Sep 28, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: orc8r Orchestrator-related issue label Sep 28, 2022
@MoritzThomasHuebner MoritzThomasHuebner changed the title refactor(orc8r): Minor improvements to sql.go refactor(orc8r): Remove proto.Clone calls Sep 28, 2022
- Remove proto.Clone calls from sql.go
- Added some missing commas to comments
- Changed empty slice creation using literals to nil slice declaration

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
…rs.go

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2022

feg-workflow

    2 files  203 suites   40s ⏱️
374 tests 374 ✔️ 0 💤 0
388 runs  388 ✔️ 0 💤 0

Results for commit 97ebc22.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2022

dp-workflow

14 tests   14 ✔️  3m 2s ⏱️
  1 suites    0 💤
  1 files      0

Results for commit 97ebc22.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2022

cloud-workflow

1 135 tests   1 135 ✔️  2m 9s ⏱️
   365 suites         0 💤
       7 files           0

Results for commit 97ebc22.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2022

agw-workflow

615 tests   611 ✔️  5m 2s ⏱️
    2 suites      4 💤
    2 files        0

Results for commit 97ebc22.

♻️ This comment has been updated with latest results.

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
@MoritzThomasHuebner MoritzThomasHuebner marked this pull request as ready for review September 28, 2022 06:18
Copy link
Contributor

@sebathomas sebathomas left a comment

Choose a reason for hiding this comment

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

👍

@MoritzThomasHuebner MoritzThomasHuebner merged commit 228c859 into magma:master Sep 29, 2022
pruthvihebbani pushed a commit to pruthvihebbani/magma that referenced this pull request Oct 10, 2022
* refactor(orc8r): Minor improvements to sql.go

- Remove proto.Clone calls from sql.go
- Added some missing commas to comments
- Changed empty slice creation using literals to nil slice declaration

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

* refactor(orc8r): Remove proto.Clone calls from sql_test.go

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

* refactor(orc8r): Remove proto.Clone calls from client_api.go

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

* refactor(orc8r): Remove proto.Clone calls from sql_entity_write_helpers.go

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

* refactor(orc8r): Remove proto.Clone calls from storage.go

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

* refactor(orc8r): Remove proto.Clone calls from sql_integ_test.go

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

* refactor(orc8r): Revert changes in sql_integ_test.go

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

* refactor(orc8r): Revert changes to import order

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>

Signed-off-by: Moritz Huebner <moritz.huebner@tngtech.com>
@MoritzThomasHuebner MoritzThomasHuebner deleted the remove_proto_clone_calls branch February 23, 2023 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: orc8r Orchestrator-related issue size/L Denotes a Pull Request that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

possible Go upgrade left-over: proto.Clone in sql.go and other files
2 participants