GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added delete blobs API for Issue 36 by shwetas16 · Pull Request #71 · hyperledger-firefly/dataexchange-https

Conversation

@shwetas16

@shwetas16 shwetas16 commented Sep 17, 2022

Copy link
Copy Markdown

Signed-off-by: Shweta Melton <shweta@[email protected]>

  • Added delete blobs API that would delete the blob file and the blob metadata file
  • If any of the files for the blob do not exist, it will clean up whatever exists.
  • On success, returns Blob metadata if available or empty response (if the metadata file did not exist at the time of deletion)
  • Added unit tests
  • Updated Swagger documentation

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shwetas16
Added delete blobs API for Issue 36
4a3d605
Signed-off-by: Shweta Melton <shweta@[email protected]>
@shwetas16
shwetas16 requested review from gabriel-indik and peterbroadhurst as code owners September 17, 2022 02:40
@gabriel-indik

gabriel-indik commented Sep 17, 2022

Copy link
Copy Markdown
Contributor

This is a great contribution, it's awesome to see this functionality being added. There are two items in the PR that might be worth looking at in more detail:

  1. In line 148 of src/handlers/blobs.ts fs.readFile is used, which reads the entire file into memory. I can see that the intention was to provide a fallback where the file is restored in case an exception happens. However the issue with this approach is that the file could be arbitrarily large which could cause problems when attempting to load it into memory.

  2. Response when the file has already been deleted should perhaps be 404 instead of 200. Note that this wouldn't interfere with idempotent behavior. Basically the API would be responding with not found when the URL of a resource that no longer exists is used for deletion.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nguyer

nguyer commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

@shwetas16 Thanks for contributing this! It looks like your email address is malformed in the sign-off message which is why the DCO check failed.

Commit sha: [4a3d605](https://github.com/hyperledger/firefly-dataexchange-https/pull/71/commits/4a3d6057048d76ee63b00b1f123e7f87803de68a), Author: Shweta Melton, Committer: Shweta Melton; Expected "Shweta Melton [[email protected]](mailto:[email protected])", but got "Shweta Melton <shweta@[[email protected]](mailto:[email protected])>".

You will need to amend that commit and force push to your branch again to resolve that. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gabriel-indik

gabriel-indik commented Jan 30, 2023

Copy link
Copy Markdown
Contributor

Deletion functionality added in #73

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gabriel-indik gabriel-indik closed this Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gabriel-indik gabriel-indik Awaiting requested review from gabriel-indik
@peterbroadhurst peterbroadhurst Awaiting requested review from peterbroadhurst

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@shwetas16 @gabriel-indik @nguyer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.