FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allows build to fail if JSON docs fail to generate. by daspecster · Pull Request #2122 · googleapis/google-cloud-python · GitHub

Allows build to fail if JSON docs fail to generate. - #2122

Merged
daspecster merged 1 commit into
googleapis:masterfrom
daspecster:fix-rtd-builds
Aug 18, 2016
Merged

Allows build to fail if JSON docs fail to generate.#2122
daspecster merged 1 commit into
googleapis:masterfrom
daspecster:fix-rtd-builds

Conversation

Copy link
Copy Markdown
Contributor

@dhermes what do you think of moving the documentation generation to after_success?

Fixes #2121

daspecster added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. docs labels Aug 18, 2016
googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 18, 2016

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

If you put it in after_success it won't fail the build if there's a problem

Copy link
Copy Markdown
Contributor Author

@dhermes switched them back around. If I understand correctly though, even if the unittests fail, the docs will still get deployed. I don't know if that's the best case.

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

I don't know if that's the best case.

It's not. Are you deploying on PRs or just merges?

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

You'll have to apply the **kwargs fix from #2071

Copy link
Copy Markdown
Contributor Author

Yup, thanks!

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

I assume / hope the Yup wasn't for "Are you deploying on PRs or just merges?"

Copy link
Copy Markdown
Contributor Author

Apparently it is! I'm fixing that right now.

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

Oy

daspecster commented Aug 18, 2016
edited
Loading

Copy link
Copy Markdown
Contributor Author

How does tox -e docs deploy to RTD? Is that just from the READTHEDOCS envar?

Update: nm I see the docs-rtd now.

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

It doesn't, https://readthedocs.org/projects/gcloud-python/ looks for commits to master and triggers a build.

The relevant file was scripts/update_docs.sh before you implemented the new docs env

Copy link
Copy Markdown
Contributor Author

A while ago, I made a separate script for the JSON docs, update_json_docs.sh. Travis is calling that now instead of tox -e json-docs directly.

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

Looking at https://github.com/GoogleCloudPlatform/gcloud-python/commits/master/.travis.yml it looks like tox already does this (#2016)

Copy link
Copy Markdown
Contributor Author

I guess I had more coffee in me back then.

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

It doesn't look like update_json_docs.sh checks if the docs build during a PR

daspecster commented Aug 18, 2016
edited
Loading

Copy link
Copy Markdown
Contributor Author

That should run it every time, or were there some cases that you didn't want the docs to build? Also, should I have it build the RTD docs with tox -e docs?

I added that line as well.

Comment thread scripts/update_json_docs.sh Outdated
}

# Run this to verifiy that the docs build successfully.
tox -e docs

This comment was marked as spam.

This comment was marked as spam.

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

tox -e docs has been changed by you (previously) to update_json_docs.sh, which now calls tox -e docs, thus creating an infinite recursion.

tox -e docs-rtd makes sure the docs actually build with Sphinx (which is the concern)

daspecster commented Aug 18, 2016
edited
Loading

Copy link
Copy Markdown
Contributor Author

I didn't change tox -e docs, I added tox -e json-docs.

[testenv:docs]
https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/tox.ini#L67

[testenv:json-docs]
https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/tox.ini#L79

So I think it should be ok?

Except for my refactor now failing.

generate_json_docs.py: error: argument --tag: expected one argument

Copy link
Copy Markdown
Contributor Author

Comment thread scripts/update_json_docs.sh Outdated
buildDocs $TRAVIS_BRANCH

if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
buildDocs $TRAVIS_BRANCH

This comment was marked as spam.

This comment was marked as spam.

Comment thread scripts/update_json_docs.sh Outdated
}

# Run this to verifiy that the docs build successfully.
buildDocs $TRAVIS_BRANCH

This comment was marked as spam.

Comment thread scripts/update_json_docs.sh Outdated
if [[ ! -z ${TRAVIS_TAG} ]]; then
DOC_VERSION = $TRAVIS_TAG
else
DOC_VERSION = $TRAVIS_BRANCH

This comment was marked as spam.

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

@daspecster This LGTM except for the tiny nit about using ${...}. Please squash and rename the PR to actually state what is happening

dhermes commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

You can merge once you've fixed the nit and Travis goes green, no need to check with me

daspecster changed the title Add RTD doc build, and move to after_success. Allows build to fail if JSON docs fail to generate. Aug 18, 2016
daspecster merged commit 78ba81e into googleapis:master Aug 18, 2016
dhermes mentioned this pull request Sep 19, 2016
daspecster deleted the fix-rtd-builds branch January 24, 2017 15:18
parthea pushed a commit that referenced this pull request Apr 1, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL