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

Save Docker image hash in RTD environment.json file #3880

merged 4 commits into from Mar 31, 2018


Copy link

@humitos humitos commented Mar 30, 2018

Use the Docker image hash to check if the environment is obsolete.

Closes #3861

humitos added 3 commits Mar 29, 2018

* Remove obsolete code

Now, we can access `self.config.build_image` directly.

* Move container_image selection to the init

At initialization time we have the project and we already know if the
project has the build image override so we can decide at that point
and save it as a instance attribute.

Then we can use this values from other places inside the same class.

* Save Docker Image hash in readthedocs-environment.json

The hash is used to know if the environment is obsolete and auto-wipe
it if necessary.

* Simplify the class naming

* Save the image hash in the json file

* Lint

* Remove invalid properties from YAML config in tests

* Add test for save_environment_json
* when the file is corrupted or we don't have access, we return that

* when there is a new setting that we need to compare and it's not in
  the JSON file, we return OBSOLETE
@humitos humitos requested a review from Mar 30, 2018
Copy link

@agjohnson agjohnson commented Mar 31, 2018

We went over this one enough I think, and it has the fix we need. LGTM!


@agjohnson agjohnson merged commit 393e31a into master Mar 31, 2018
1 check passed
@agjohnson agjohnson deleted the humitos/rtdenv/save-image-hash branch Mar 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants