-
Notifications
You must be signed in to change notification settings - Fork 802
Don't Load GVL v1 for TCF2 (+ TCF1 Cleanup) #1693
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
Conversation
gdpr/vendorlist-fetching.go
Outdated
latestVersion := saveOne(ctx, client, urlMaker(0, tcfSpecVersion), saver, tcfSpecVersion) | ||
func preloadCache(ctx context.Context, client *http.Client, urlMaker func(uint16) string, saver saveVendors) { | ||
latestVersion := saveOne(ctx, client, urlMaker(0), saver) | ||
firstVersion := uint16(2) // The GVL for TCF2 has no vendors defined and is very unlikely to be used. Don't load it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete comment. It is the first version of the GVL for TCF2 that has no vendors, not all TCF2 GVLs. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
gdpr/vendorlist-fetching.go
Outdated
latestVersion := saveOne(ctx, client, urlMaker(0, tcfSpecVersion), saver, tcfSpecVersion) | ||
func preloadCache(ctx context.Context, client *http.Client, urlMaker func(uint16) string, saver saveVendors) { | ||
latestVersion := saveOne(ctx, client, urlMaker(0), saver) | ||
firstVersion := uint16(2) // The first version of the GVL for TCF2 has no vendors defined and is very unlikely to be used. Don't preload it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on calling this secondVersion
instead of firstVersion
and moving this comment to just above the for
loop that follows this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about firstVersionToLoad
? That's a more a accurate description IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Partially addresses #1689 and separates the TCF1 vs TCF2 fetchers for easy removal of TCF2 in the near future and removal now for TCF1 url construction.