Skip to content

Conversation

@Matheo-B
Copy link

@Matheo-B Matheo-B commented Dec 3, 2024

No description provided.

@Matheo-B Matheo-B self-assigned this Dec 3, 2024
Copy link
Contributor

@TheoHollender TheoHollender left a comment

Choose a reason for hiding this comment

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

Missing some implementations on buckets
Missing code coverage on bucket
polystorage/bucket/bucket.py needs to become polystorage/models.py (can also become polystorage/models/bucket.py and being imported into polystorage/models/__init__.py)

polystorage package needs to become a django app
Coverage needs to be set up as a django code coverage system
polystorage/main.py needs to disappear
test_settings should be created
Code coverage should import all files in polystorage folder

super().save(*args, **kwargs) # Save first to get the ID

if is_new:
self.create_associated_bucket_instance()
Copy link
Contributor

Choose a reason for hiding this comment

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

Move the super().save() after this line to avoid desynchronized databases

}

self.root_path = generated_root_path
self.save(update_fields=['root_path'])
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove self.save() for the same reasons

Comment on lines 63 to 67
random_folder = uuid.uuid4().hex[:8]
# Use the INSTANCES_MAIN_FOLDER setting as the base directory
base_folder = settings.INSTANCES_MAIN_FOLDER
# Construct the full root path
generated_root_path = os.path.join(base_folder, random_folder)
Copy link
Contributor

Choose a reason for hiding this comment

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

The root path should be generated on the cluster, and returned in the json response

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.

4 participants