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

✨ Add User Agent Client Hint Params to Google ad request params #33621

Merged
merged 10 commits into from
Aug 9, 2021

Conversation

zombifier
Copy link
Contributor

@zombifier zombifier commented Apr 2, 2021

No description provided.

@CLAassistant
Copy link

CLAassistant commented Apr 2, 2021

CLA assistant check
All committers have signed the CLA.

@zombifier
Copy link
Contributor Author

Hi all,
reviving this since server-side support should have landed. PTAL.

@amp-bundle-size amp-bundle-size bot requested a review from rcebulko August 5, 2021 20:26
Copy link
Member

@calebcordry calebcordry left a comment

Choose a reason for hiding this comment

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

Also not sure if you are aware but we allow async/await in our tests if you want to use it.

@calebcordry
Copy link
Member

@rcebulko I think the bundle size check here might be bad? Any idea what's going on?

@rcebulko
Copy link
Contributor

rcebulko commented Aug 6, 2021

@rcebulko I think the bundle size check here might be bad? Any idea what's going on?

IIRC there was a big a while back, but this is an old PR so it probably doesn't have the fix. Rebasing should fix hopefully

@calebcordry
Copy link
Member

Thanks @rcebulko Khoi can you try rebasing?

@zombifier
Copy link
Contributor Author

The ads/google/a4a/utils.js must not depend on src/core/data-structures/promise.js error persists. Strange. Is it possible that the check's indeed triggered by usages of Promise in the PR and that the rest of the code is older than the check so they were "grandfathered" in?

@calebcordry
Copy link
Member

@rsimha Could you help us with the dep-check on this one? It seems to think we introduced a new dependency ads/google/a4a/utils.js -> src/core/data-structures/promise.js but all that has been added is a Promise.resolve(). I can repro by adding a line anywhere in the ads/google/a4a/utils.js file const foo = Promise.resolve()

@rcebulko
Copy link
Contributor

rcebulko commented Aug 9, 2021

@rsimha Could you help us with the dep-check on this one? It seems to think we introduced a new dependency ads/google/a4a/utils.js -> src/core/data-structures/promise.js but all that has been added is a Promise.resolve(). I can repro by adding a line anywhere in the ads/google/a4a/utils.js file const foo = Promise.resolve()

We have a transformer that rewrites all empty Promise.resolve() calls to use the same resolvedPromise object defined in that file, rather than re-creating a fresh Promise object and resolving it each time (much slower/more memory taken). You can add the dependency for now, and maybe we should allowlist that dependency more generally?

@calebcordry
Copy link
Member

thanks again @rcebulko! Makes sense but agree we should do something if we can to help future users, it's pretty unclear what is happening.

@zombifier
Copy link
Contributor Author

Added the dependency. Thanks all for the help.

@calebcordry calebcordry enabled auto-merge (squash) August 9, 2021 21:15
@calebcordry calebcordry merged commit fe9f94e into ampproject:main Aug 9, 2021
@rcebulko
Copy link
Contributor

@rsimha Do we have a mechanism for allowlisting code in dep-check? Really anything from #core is safe to be imported from anywhere.

@rsimha
Copy link
Contributor

rsimha commented Aug 10, 2021

@rsimha Do we have a mechanism for allowlisting code in dep-check? Really anything from #core is safe to be imported from anywhere.

Yes, there is an allowlist mechanism. I'd imagine it's possible to allow all imports from src/core by changing this glob in dep-check-config.js to include everything in src/ except src/core.

mustNotDependOn: 'src/**/*.js',

It appears that matchBadDeps() in dep-check.js expands globs and arrays of globs, but it might take some trial and error to get them to do what you'd like.

/cc @erwinmombay @samouri @jridgewell who should know more about these rules than I do.

@samouri
Copy link
Member

samouri commented Aug 10, 2021

I agree what we should allow core imports everywhere

@rcebulko
Copy link
Contributor

The glob we would want is src{,/!(core)/**}/*.js. I can throw together a PR for this

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.

None yet

7 participants