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

[ENH]: add method to delete database (single-node) #3457

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented Jan 9, 2025

Description of changes

Adds a method to delete a database.

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

Yes.

Copy link

github-actions bot commented Jan 9, 2025

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

codetheweb commented Jan 9, 2025

@codetheweb codetheweb changed the title [ENH]: add method to delete database [ENH]: add method to delete database (single-node) Jan 9, 2025
@codetheweb codetheweb marked this pull request as ready for review January 9, 2025 19:18
@codetheweb codetheweb requested a review from atroyn January 9, 2025 19:18
Copy link
Contributor

@atroyn atroyn left a comment

Choose a reason for hiding this comment

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

I think we can make the tests a little more robust.

What happens if a user has a handle on a Collection, and then delete_database gets called underneath? Maybe we need a friendly error to let them know what happened.

@codetheweb
Copy link
Contributor Author

What happens if a user has a handle on a Collection, and then delete_database gets called underneath? Maybe we need a friendly error to let them know what happened.

InvalidCollectionException will be thrown. Updated the test to assert this.

@codetheweb codetheweb requested a review from atroyn January 9, 2025 21:10
@codetheweb codetheweb force-pushed the feat-list-databases-api branch from f2fc604 to b9bdfe2 Compare January 9, 2025 21:55
@codetheweb codetheweb force-pushed the feat-delete-database-single-node branch from 654c768 to 8e3c1ca Compare January 9, 2025 21:55
@codetheweb codetheweb force-pushed the feat-list-databases-api branch from b9bdfe2 to 8b3a2e8 Compare January 9, 2025 23:10
@codetheweb codetheweb force-pushed the feat-delete-database-single-node branch from 8e3c1ca to 9c8302f Compare January 9, 2025 23:10
@codetheweb codetheweb changed the base branch from feat-list-databases-api to graphite-base/3457 January 10, 2025 00:38
@codetheweb codetheweb force-pushed the feat-delete-database-single-node branch from 9c8302f to adc995d Compare January 10, 2025 00:39
@codetheweb codetheweb changed the base branch from graphite-base/3457 to main January 10, 2025 00:40
@codetheweb codetheweb force-pushed the feat-delete-database-single-node branch from adc995d to 1b4c82b Compare January 10, 2025 00:40
@codetheweb codetheweb force-pushed the feat-delete-database-single-node branch from 1b4c82b to edd88bf Compare January 13, 2025 17:58
Copy link
Contributor

@atroyn atroyn left a comment

Choose a reason for hiding this comment

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

LGTM, optional test improvement.

Copy link
Contributor Author

codetheweb commented Jan 14, 2025

Merge activity

  • Jan 13, 7:00 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 13, 7:06 PM EST: Graphite couldn't merge this PR because it failed for an unknown reason.
  • Jan 13, 7:43 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Jan 13, 7:44 PM EST: Graphite rebased this pull request as part of a merge.
  • Jan 13, 7:44 PM EST: A user merged this pull request with Graphite.

@codetheweb codetheweb force-pushed the feat-delete-database-single-node branch from b3dab70 to 2392548 Compare January 14, 2025 00:43
@codetheweb codetheweb merged commit 3105823 into main Jan 14, 2025
77 checks passed
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.

2 participants