Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Cdn check #14769

Closed
wants to merge 5 commits into from
Closed

Cdn check #14769

wants to merge 5 commits into from

Conversation

petebacondarwin
Copy link
Contributor

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

chores

What is the current behavior? (You can also link to an open issue here)

  • failure to collect the correct CDN version information can cause the docs website to crash
  • builds always attempt to make requests to servers, even if you are offline

What is the new behavior (if this is a feature change)?

  • builds fail if the CDN version information is missing or if the production version of the app is not working
  • you can set your local builds to run without making requests to the server

Does this PR introduce a breaking change?

Nope

Please check if the PR fulfills these requirements

Other information:

Related to #14761

We have had issues where the docs application has gone down because
our build included invalid URLs to the production angular libraries.

This change runs a subset of the docs e2e tests directly against these
production libraries to ensure that they are accessible. If not then these
tests will fail and the CI build will abort, preventing the docs app from
being updated.
Previously it was slow and problematic to run builds if you were not connected
to the internet because the build scripts make requests to github and the
Google CDN to find out version information.

You can now disable these requests by setting the ANGULAR_1_OFFLINE_BUILD
environment variable to a truthy value.
@Narretz
Copy link
Contributor

Narretz commented Jun 14, 2016

OFFLINE is not 100% correct, it's more like NO_REMOTE_REQUESTS

@@ -39,7 +39,7 @@ describe('docs.angularjs.org', function () {


it('should change the page content when clicking a link to a service', function () {
browser.get('build/docs/index.html');
browser.get('build/docs/index-production.html');
Copy link
Member

Choose a reason for hiding this comment

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

So, by using -production we are not testing against our local build, but only against the CDN version, right?
This makes sense, since it is a separate app that just happens to live on the same repo and the app will use a CDN version (not our local build).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, so there are other tests in this folder that hit the normal index.html.
Also all the main e2e tests from the examples are run against local angular.

@petebacondarwin
Copy link
Contributor Author

OK @Narretz, I can change that constant. Any other concerns?

@Narretz
Copy link
Contributor

Narretz commented Jun 14, 2016

I'm still testing.

Previously it was slow and problematic to run builds if you were not connected
to the internet because the build scripts make requests to github and the
Google CDN to find out version information.

You can now disable these requests by setting the NG1_BUILD_NO_REMOTE_VERSION_REQUESTS
environment variable to a non-empty value

if (NO_REMOTE_REQUESTS) {
console.log('==============================================================================================');
console.log('Running Offline:');
Copy link
Contributor

Choose a reason for hiding this comment

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

"Running without getting remote tag and cdn version data"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Running with no remote requests for version data"?

Previously it was slow and problematic to run builds if you were not connected
to the internet because the build scripts make requests to github and the
Google CDN to find out version information.

You can now disable these requests by setting the NG1_BUILD_NO_REMOTE_VERSION_REQUESTS
environment variable to a non-empty value
@Narretz
Copy link
Contributor

Narretz commented Jun 15, 2016

LGTM. Please be prepared for a follow-up that tries to make the "online" version work on Windows (because it doesn't like -o dev/null)

petebacondarwin added a commit that referenced this pull request Jun 15, 2016
We have had issues where the docs application has gone down because
our build included invalid URLs to the production angular libraries.

This change runs a subset of the docs e2e tests directly against these
production libraries to ensure that they are accessible. If not then these
tests will fail and the CI build will abort, preventing the docs app from
being updated.

Closes #14769
petebacondarwin added a commit that referenced this pull request Jun 15, 2016
Previously it was slow and problematic to run builds if you were not connected
to the internet because the build scripts make requests to github and the
Google CDN to find out version information.

You can now disable these requests by setting the NG1_BUILD_NO_REMOTE_VERSION_REQUESTS
environment variable to a non-empty value

Closes #14769
petebacondarwin added a commit that referenced this pull request Jun 15, 2016
We have had issues where the docs application has gone down because
our build included invalid URLs to the production angular libraries.

This change runs a subset of the docs e2e tests directly against these
production libraries to ensure that they are accessible. If not then these
tests will fail and the CI build will abort, preventing the docs app from
being updated.

Closes #14769
petebacondarwin added a commit that referenced this pull request Jun 15, 2016
Previously it was slow and problematic to run builds if you were not connected
to the internet because the build scripts make requests to github and the
Google CDN to find out version information.

You can now disable these requests by setting the NG1_BUILD_NO_REMOTE_VERSION_REQUESTS
environment variable to a non-empty value

Closes #14769
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants