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

fix: Update the tox.ini to different tox env #3164

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

Revathyvenugopal162
Copy link
Contributor

No description provided.

@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.36%. Comparing base (ba66041) to head (1adab82).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3164      +/-   ##
==========================================
- Coverage   87.44%   87.36%   -0.09%     
==========================================
  Files          55       55              
  Lines        9845     9923      +78     
==========================================
+ Hits         8609     8669      +60     
- Misses       1236     1254      +18     

Copy link
Member

@jorgepiloto jorgepiloto left a comment

Choose a reason for hiding this comment

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

This is going in the right direction, thanks @Revathyvenugopal162.

doc/source/conf.py Outdated Show resolved Hide resolved
doc/source/conf.py Show resolved Hide resolved
doc/source/index.rst Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tox.ini Show resolved Hide resolved
tox.ini Show resolved Hide resolved
docker run \
--env ANSYSLMD_LICENSE_FILE={env:ANSYSLMD_LICENSE_FILE} \
--name mapdl -p {env:LOCAL_MAPDL_PORT}:50052 \
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the heads up, @germa89.

We should take advantage of this and add a rule for building a docker image locally. This will help us to review the docker/ directory and the current image building process.

This directory could look like this:

docker/
|- linux/
   |- Dockerfile
   |- docker-compose.yml
   |- distributions/
      |- .gitignore  # Ignore everything except the dir itself
      |- .gitkeep

Users should just copy MAPDL artifacts in the distributions/ dir. Then, running:

tox -e docker-build-images would trigger the docker-compose.yml file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Building the docker image is a bit complex.. because the dockerignore depends on the MAPDL version.
The docker directory is not used by the CICD nor myself to build the docker image at the moment, hence it is not fully maintained.
We have some instructions about building the docker image in: https://mapdl.docs.pyansys.com/version/stable/getting_started/make_container.html

We could meet next week to discuss this more in details.

@wiz-inc-572fc38784
Copy link
Contributor

wiz-inc-572fc38784 bot commented Jun 13, 2024

Wiz Scan Summary

IaC Misconfigurations 0C 0H 39M 1L 3I
Vulnerabilities 0C 0H 0M 0L 0I
Sensitive Data 0C 0H 0M 0L 0I
Total 0C 0H 39M 1L 3I
Secrets 0🔑

@github-actions github-actions bot added the CI/CD Related with CICD, Github Actions, etc label Jun 18, 2024
@@ -1,84 +1,112 @@
# Use Ubuntu 22.04 as the base image
Copy link
Member

Choose a reason for hiding this comment

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

This line is explicit. No need for a comment.

Suggested change
# Use Ubuntu 22.04 as the base image

docker/linux/Dockerfile Outdated Show resolved Hide resolved
&& rm -rf *.log

# Cleaning up unnecessary files
RUN rm -rf /tmp/*
Copy link
Member

Choose a reason for hiding this comment

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

Remove only the right files in the tmp/ dir. There may be files in this directory used by other running processes.

- USERNAME=mapdl
- USER_UID=1000
- LICENSE_SERVER=${LICENSE_SERVER}
- AWP_ROOT222=/ansys_inc
Copy link
Member

Choose a reason for hiding this comment

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

Is this a variable linked to a unified install? Should it be AWP_ROOT241?

Copy link
Collaborator

Choose a reason for hiding this comment

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

it is.

GITHUB_TOKEN
commands =
docker login ghcr.io -u {env:GITHUB_USERNAME} -p {env:GITHUB_TOKEN}
Copy link
Member

Choose a reason for hiding this comment

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

Login is no longer required since users can build the images locally:

Suggested change
docker login ghcr.io -u {env:GITHUB_USERNAME} -p {env:GITHUB_TOKEN}

--env ANSYSLMD_LICENSE_FILE={env:ANSYSLMD_LICENSE_FILE} \
--name mapdl -p {env:LOCAL_MAPDL_PORT}:50052 \
{env:MAPDL_DOCKER_REGISTRY_URL} -smp
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{env:MAPDL_DOCKER_REGISTRY_URL} -smp
-smp

@github-actions github-actions bot removed BUG labels Jun 18, 2024
@germa89
Copy link
Collaborator

germa89 commented Aug 20, 2024

@jorgepiloto @Revathyvenugopal162 how are we doing with this? :)

@Revathyvenugopal162
Copy link
Contributor Author

@jorgepiloto @Revathyvenugopal162 how are we doing with this? :)

Sorry for the delay, I was tied up with the theme reformatting. I’ll dive into this PR next week, fix the issue, and keep you updated on the progress.

@github-actions github-actions bot added documentation Documentation related (improving, adding, etc) bug Issue, problem or error in PyMAPDL labels Aug 23, 2024
Copy link
Contributor

Hello! 👋

Your PR is changing the image cache. So I am attaching the new image cache in a new commit.

This commit does not re-run the CICD workflows (since no changes are made in the codebase) therefore you will see the actions showing in their status Expected — Waiting for status to be reported. Do not worry. You commit workflow is still running here 😄

You might want to rerun the test to make sure that everything is passing. You can retrigger the CICD sending an empty commit git commit -m "Empty comment to trigger CICD" --allow-empty.

You will see this message everytime your commit changes the image cache but you are not attaching the updated cache. 🤓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, problem or error in PyMAPDL CI/CD Related with CICD, Github Actions, etc documentation Documentation related (improving, adding, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants