-
Notifications
You must be signed in to change notification settings - Fork 517
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
Help with cache.NewSnapshot breaking change and outdated documentation #513
Comments
Per the test here:
and the list of resource types that it validates here: go-control-plane/pkg/cache/v3/resource.go Line 38 in 996a28b
You could go from and one of the nice things about the signature change (other than extensibility) is that if you only care about a subsection of the old arguments you no longer have to specify all the slices in this map. Take the above comment with many grains of salt as I have not tested/used 0.10.0 and inspected the test suite to derive this. |
Thanks @nfuden I'll have to give that a try. I looked at the tests but it was a bit confusing. Mainly trying to understand the map[string] bit first, guess maybe that's making room for expansion in the future any that's why there is only a single entry I'll give this a shot. |
Hi there! I will update the documentation, it is old and needs to be brought up, we have changed quite a bit since that was written. Sorry for the inconvenience I will try and knock that out tomorrow |
Hi there! Just opened this PR to address some of these issues: #520. As per earlier comments @nfuden was on the money. The purpose of the signature change was to aid with the addition of xDS services as upstream defines more. We had to modify the signature every time a new service was created. That is no longer the case plus this provides some flexibility around resources we specify, as well as aids in support for generic/opaque resource type support. |
I'm currently on 0.9.9 and looking at going to 0.10.0 and it looks like a breaking change was introduced. It also appears that this change was accidentally omitted from the changelog, unless I missed it?
It appears that the cache.NewSnapshot function was changed to take a different set of arguments however all existing documentation still refers to the old function arguments.
Can anyone help with an upgrade example?
The text was updated successfully, but these errors were encountered: