Skip to content

Log conda version and docker image hash when creating a container. #8755

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

Closed

Conversation

dogukanteber
Copy link
Contributor

@dogukanteber dogukanteber commented Dec 11, 2021

This PR hopefully resolves #8375 . I have written a small method to get the conda version but I also saw venv_path in the Conda class which is located in python_environment.py. I could not decide if it returns the conda version. If it is more appropriate, I can remove the method I wrote and change it with the existing one.

@dogukanteber dogukanteber requested a review from a team as a code owner December 11, 2021 18:52
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Thanks for your PR! I'm requesting changes because we need to run the command inside the Docker container. We can't use subprocess.run for this unfortunately.

Comment on lines 984 to 989
version = subprocess.run(
["conda", "--version"],
capture_output=True,
text=True,
check=True,
)
Copy link
Member

Choose a reason for hiding this comment

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

We are using Docker in our build process, so this command won't work. We need to execute the conda --version inside the Docker container where the build is taking place. I remember there are other places in the code where we execute a command to get the Sphinx's version (I think) from where you can copy the idea to get the conda's version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your comment @humitos. I am dealing with my finals now. Would that be okay if a take a look at it in the next week?

Copy link
Member

Choose a reason for hiding this comment

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

Yes! 👍🏼

@astrojuanlu
Copy link
Contributor

Hi @dogukanteber ! Some tests are still failing: E AttributeError: 'NoneType' object has no attribute 'container_id' (see the red Circle CI check. Have you already finished your finals? :)

@dogukanteber
Copy link
Contributor Author

Hello @astrojuanlu. Yes, I have finished my finals. I have not realized some tests failed. I did some changes but it did not work. Right now, I am stuck. I cannot find a way out. Do you have any recommendations on how should I proceed?

@astrojuanlu
Copy link
Contributor

The tests fail now with E TypeError: 'Mock' object is not subscriptable, but I'm not an expert in this code so I can't give specific advice. Some debugging will be needed.

@stale
Copy link

stale bot commented May 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label May 2, 2022
@ericholscher
Copy link
Member

Thanks for the PR. This can now be accomplished with build.jobs config option, so I'm going to close this.

https://docs.readthedocs.io/en/latest/config-file/v2.html#build-jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: stale Issue will be considered inactive soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging: log conda version and docker image hash
4 participants