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

Support local files with matching filenames #123

Merged
merged 3 commits into from
Sep 7, 2024

Conversation

b-rowan
Copy link
Contributor

@b-rowan b-rowan commented Sep 5, 2024

Adds support for local files with matching filenames but different hashes. This is done by moving the path of the files to <artifact_dir>/<file_hash>/<filename>. Files with matching versions and compatibility will still collide and raise an error to the user.

Fixes: #104

Need to call `generate_schemas` to make sure that the initial DB is set up properly.
To prevent overlaps with local files that have the same name but are different files, the path for artifacts is now `<artifact_dir>/<file_hash>/<filename>`.
Files with the same version and compatibility wil still raise an error to the frontend.

Fixes: #104
@b-rowan b-rowan added this to the v0.3.0 milestone Sep 5, 2024
@@ -5,6 +5,7 @@

async def init():
await Tortoise.init(config=TORTOISE_CONF)
await Tortoise.generate_schemas()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should not be necessary. As written in the README.md : "Create or upgrade database: poetry run aerich upgrade"

My working assumption is, that DB manipulations are best left to the Dev / Ops person. Don't automate it within the app.

@tsagadar tsagadar merged commit ffee8e7 into master Sep 7, 2024
5 checks passed
@tsagadar tsagadar deleted the dev_filename_differences branch September 7, 2024 09:05
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.

Support different (local) software with same file name
3 participants