Skip to content

fix: update store file to use current directory instead of parent directory - #21

Open
The0mikkel wants to merge 2 commits into
developfrom
fix/20/update-mapping-path-to-parent-dir
Open

fix: update store file to use current directory instead of parent directory#21
The0mikkel wants to merge 2 commits into
developfrom
fix/20/update-mapping-path-to-parent-dir

Conversation

@The0mikkel

Copy link
Copy Markdown
Member

This update fixes #20 by updating the store file location from the same directory, to the parent directory, which was introduced by mistake in 27085b4.

This does cause a breaking change to the current version, and all users are expected to update their deployment to use the current directory (the current configuration in the docker-compose.yml files provided).
If you have not update the docker-compose.yml files, you should take a copy of the /challenge_issues.json, and store it in the /app/challenge_issues.json before stopping the container. If the data stored in /challenge_issues.json is not backed up before updating, data loss may occur.

@The0mikkel The0mikkel self-assigned this Jul 13, 2026
Copilot AI review requested due to automatic review settings July 13, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the on-disk store location so the bot reads/writes challenge_issues.json in the container’s working directory (/app), aligning with the provided docker-compose.yml volume mount and fixing the regression described in #20.

Changes:

  • Adjust Store.MAPPING_PATH to use a single os.path.dirname(__file__), so the JSON store resolves to /app/challenge_issues.json in the Docker image layout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MikkelHebel MikkelHebel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This fixes Docker but just moves the bug to local dev. python src/main.py runs from the repo root, so removing the second dirname puts the file in src/ instead of at the root.

os.getcwd() might be more robust here than file, since that's already /app in Docker and the repo root locally.

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.

MAPPING_PATH is set to go two directories up

3 participants