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 a caches.json file that provides meta data about AMP Caches. #9804

Merged
merged 2 commits into from Jun 9, 2017

Conversation

cramforce
Copy link
Member

@cramforce cramforce commented Jun 8, 2017

Currently contains only Google info. CC @dknecht :)

Adds a generic path that checks the validity of all JSON files in the repo.

Fixes #7259
Related to #6174

Currently contains only Google info. CC @dknecht :)

Adds a generic path that checks the validity of all JSON files in the repo.

Fixes ampproject#7259
Related to ampproject#6174
@dknecht
Copy link
Contributor

dknecht commented Jun 8, 2017

cc: @oliy @irtefa

Copy link
Contributor

@rsimha rsimha left a comment

Choose a reason for hiding this comment

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

LGTM with a few minor comments.

"updatePingApiUrlPrefix": "https://cdn.ampproject.org/"
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Some json files in the code base have a trailing newline while others don't. Not sure what the preferred choice is here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I added one here. Doesn't matter so much :)

Copy link
Contributor

Choose a reason for hiding this comment

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

What's involved in getting the cloudflare cache listed here? Where is this mapping used? Should we create a follow up PR to add the cloudflare cache?

});
}

gulp.task('json-syntax', 'Check that JSON files are valid JSON.', checkValidJson);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing a trailing newline

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

JSON.parse(file.contents.toString());
} catch (e) {
util.log(util.colors.red('Invalid JSON in "'
+ file.relative + ': ' + e.message));
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Missing a closing double quote before :

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,45 @@
/**
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@@ -224,6 +224,7 @@ const command = {
timedExecOrDie(`${gulp} clean`);
},
runLintChecks: function() {
timedExecOrDie(`${gulp} json-syntax`);
Copy link
Contributor

@rsimha rsimha Jun 8, 2017

Choose a reason for hiding this comment

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

Depending on how long gulp json-syntax is expected to take, it could be run before or after gulp lint, which takes about 1m 20s to run. It makes a difference on Travis if we early-exit by running quicker tests before longer-running ones (provided, of course, there's no dependency between the tests).

Copy link
Member Author

Choose a reason for hiding this comment

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

It is much faster (8s), so this order should be good.

@@ -224,6 +224,7 @@ const command = {
timedExecOrDie(`${gulp} clean`);
},
runLintChecks: function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rename this to runLintAndJsonChecks for implicit documentation in other parts of this file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@cramforce
Copy link
Member Author

@oliy Sent a PR, but the only usage right now is to discover update-ping endpoints, so you should only add yourself when you are ready to receive traffic.

@cramforce cramforce merged commit 55a3ac0 into ampproject:master Jun 9, 2017
alanorozco added a commit that referenced this pull request Jun 9, 2017
erwinmombay pushed a commit that referenced this pull request Jun 9, 2017
* Revert "Add a caches.json file that provides meta data about AMP Caches. (#9804)"

This reverts commit 55a3ac0.

* Revert "Fix flaky amp-animation test (#9817)"

This reverts commit 4a9cf91.

* Revert "Run integration tests for PRs that change `test/integration` (#9807)"

This reverts commit 233c76e.

* Revert "Finally, fix visState integration tests (#9806)"

This reverts commit 47f9191.

* Revert "add jwt plugin (#8672)"

This reverts commit a23cbd1.

* Revert "Add missing methods to AmpContext tests (#9682)"

This reverts commit 646f103.
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

6 participants