Skip to content

AMP packager filter #9763

Closed
Closed

Description

@rgs1

Activity

  1. cpapazian commented on Jan 21, 2020

    @cpapazian
  2. twifkak commented on Jan 21, 2020

    @twifkak

    I would also add a bit of request-side logic to validate the Accept and AMP-Cache-Transform headers and save that in the StreamInfo for the response filter.

  3. added
    design proposal
    on Jan 22, 2020
  4. cpapazian commented on Jan 22, 2020

    @cpapazian

    @twifkak are the optimizations/transformations in https://github.com/ampproject/amppackager/tree/releases/transformer the same as those implemented in https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer? another option is to implement the cache friendly optimizations in our frontend web server as we render the AMP HTML, and only do the SXG packaging/signing in the envoy filter.

  5. twifkak commented on Jan 22, 2020

    @twifkak

    @Gregable @honeybadgerdontcare re: transformed AMP validation

    They are similar but not exact. Two important differences:

    • amppkg rewrites various subresource URLs to point to the Google AMP Cache (source) and optimizer doesn't; this is signified by the <html transformed> attribute, either google;v=N or self;v=N
    • The HTML serializers are different. Currently, Google's internal AMP SXG validator is very picky about the HTML serialization, so it's unlikely to pass unless it runs through an exact port of this printer.

    There may be other differences (in terms of the set of transformers that are run), though. We haven't intended the optimizer for use in an SXG, so it was never vetted. You'd probably have to compare the two codebases (or grep validator protoasciis for transformed). You also run the risk of some old transform becoming invalid in the distant future, as we rev our versions, though we haven't invalidated anything yet. Note that the risk is mitigated: If it fails AMP SXG validation, it should still be able to pass normal AMP validation for display in the viewer.

    Also, I've attempted to document the AMP SXG validation requirements; hopefully you find some of that useful.

  6. cpapazian commented on Jan 23, 2020

    @cpapazian
  7. stale commented on Feb 22, 2020

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

  8. added
    stale
    on Feb 22, 2020
  9. honeybadgerdontcare commented on Feb 25, 2020

    @honeybadgerdontcare

    To follow up to @twifkak's comment. The validator will utilize what is written in it's engine and protoascii defined rules to determine if a document is valid. There should not be any divergence from those rules to what is allowed when the attribute transformed is present on the html tag. As time goes on, more rules may change for the transformed type identifier.

  10. removed
    stale
    on Feb 25, 2020
  11. stale commented on Mar 26, 2020

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

  12. added
    stale
    on Mar 26, 2020
  13. stale commented on Apr 2, 2020

    @stale

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design proposalstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions