Skip to content

Conversation

Iteron-dev
Copy link
Member

For some strange reason, the docker build action along with the cypress tests action stopped working on Jun 18. A fix was made 50657ed - but it didn't help with Cypress, only with the docker build action. Unfortunately, as it turns out, the docker build action (including Cypress) still doesn't work due to another error:

0.280 Traceback (most recent call last):
0.280   File "/home/oioioi/.local/bin/oioioi-create-config", line 5, in <module>
0.280     from oioioi.deployment.create_config import main
0.280 ModuleNotFoundError: No module named 'oioioi'

This error probably didn't exist before, but now it does because of the installation of a newer version of setuptools through dependencies.

Long-term, it would be advisable to stop using setup.py in place of pyproject.toml and gently modernize the build process.

Copy link
Contributor

@stopnoanime stopnoanime left a comment

Choose a reason for hiding this comment

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

Good fix

stopnoanime
stopnoanime previously approved these changes Sep 27, 2025
Copy link
Member

@MasloMaslane MasloMaslane left a comment

Choose a reason for hiding this comment

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

Maybe it would be better to copy whole code before pip3 install -r requirements.txt? Im not sure why its currently done this way, copying files one by one, running pip3 and only at the end copying whole code.

@Iteron-dev
Copy link
Member Author

Maybe it would be better to copy whole code before pip3 install -r requirements.txt? Im not sure why its currently done this way, copying files one by one, running pip3 and only at the end copying whole code.

It's probably done this way so that if someone changes the code, the requirements don't get reinstalled during the Docker build (they would be cached). Copying everything at once would remove that possibility. However, it might actually be better to copy all the files at once - during development, you usually don't rebuild the Docker image that often anyway, and rarely does anyone need a rebuild without updating the Python or Node.js requirements.

@Iteron-dev
Copy link
Member Author

Since the Cypress tests were still failing (https://github.com/Iteron-dev/oioioi/actions/runs/18063771807), I removed the installation of the new gevent==25.5.1 (honestly, I don’t know why such a new gevent ended up here), because the workers were throwing errors. I also fixed the insertion of CAPTCHA_TEST_MODE=True into settings.py.

Now it seems like everything is working as it should :)

@Iteron-dev Iteron-dev changed the title Fix: Docker build failure - ModuleNotFoundError Fix: Docker build failure (ModuleNotFoundError) and cypress tests action Sep 27, 2025
@Iteron-dev Iteron-dev changed the title Fix: Docker build failure (ModuleNotFoundError) and cypress tests action Fix: Docker build failure (ModuleNotFoundError) and cypress tests Sep 27, 2025
Copy link
Contributor

@stopnoanime stopnoanime left a comment

Choose a reason for hiding this comment

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

Builds successfully locally. Adding the newline in cypress-apply-settings makes it more robust. LGTM

@Iteron-dev Iteron-dev merged commit e227604 into sio2project:master Sep 28, 2025
2 checks passed
@Iteron-dev Iteron-dev deleted the fix/docker-build branch September 28, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants