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

chore!: Remove deprecated client Init() function #353

Merged
merged 2 commits into from Aug 5, 2022

Conversation

znewman01
Copy link
Contributor

@znewman01 znewman01 commented Aug 3, 2022

Has been deprecated for a release or so.

This fixes some tests and removes others; the removals are all
justified:

  • TestInitRootExpired: testing of InitLocal checks the behavior on
    expired roots (which is different; it allows expired roots)
  • TestInitRootTooLarge: covered now in TestUpdate

We also add a "GetMeta" function, used to get at the root json.

BREAKING CHANGE: remove client.Init() in favor of InitLocal()

Please fill in the fields below to submit a pull request. The more information that is provided, the better.

Fixes #
Release Notes:

Types of changes:

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of the changes being introduced by the pull request:

Please verify and check that the pull request fulfills the following requirements:

  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

@znewman01
Copy link
Contributor Author

Fixes #208

Hang on, let me see what's up with the tests....

Copy link
Contributor

@asraa asraa left a comment

Choose a reason for hiding this comment

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

thank you very much! so prompt

client/client_test.go Outdated Show resolved Hide resolved
asraa
asraa previously approved these changes Aug 3, 2022
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

#208 (comment) talks about renaming InitLocal() --> Init(), is there a reason we shouldn't do that?

This is already a breaking change and the function signatures are different, so it should be relatively easy to figure out how to change Init() calls.

@haydentherapper as the author of InitLocal(), wdyt?

@hosseinsia @ethan-lowman-dd any thoughts on this?

@znewman01
Copy link
Contributor Author

Good call! I might prefer to do that in a follow-up PR, which will be very very easy to write/review.

@trishankatdatadog
Copy link
Member

This is already a breaking change and the function signatures are different, so it should be relatively easy to figure out how to change Init() calls.

Agreed

@joshuagl
Copy link
Member

joshuagl commented Aug 4, 2022

Easy to review follow-up PR works for me, thanks.

Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

Thanks for handling this so quickly.

Has been deprecated for a release or so.

This fixes some tests and removes others; the removals are all
justified:

- TestInitRootExpired: testing of InitLocal checks the behavior on
  expired roots (which is *different*; it allows expired roots)
- TestInitRootTooLarge: covered now in TestUpdate

We also add a "RawMeta" function, used to get at the root json. I could
be persuaded that this should be a "RawRoot" instead.

BREAKING CHANGE: remove client.Init() in favor of InitLocal()

Signed-off-by: Zachary Newman <z@znewman.net>
Signed-off-by: Zachary Newman <z@znewman.net>
@znewman01
Copy link
Contributor Author

Had to rebase so I need another round of approvals, sorry!

@trishankatdatadog trishankatdatadog merged commit 8124e8a into theupdateframework:master Aug 5, 2022
@znewman01
Copy link
Contributor Author

FYI, follow-up here to rename "InitLocal" to "Init": #354

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

Successfully merging this pull request may close these issues.

None yet

4 participants