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

Add update endpoint without primary for images #35 #75

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

asuresh-code
Copy link
Contributor

Description

see #35

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage
  • {more steps here}

Agile board tracking

closes #35

@asuresh-code asuresh-code self-assigned this Dec 5, 2024
@asuresh-code asuresh-code marked this pull request as draft December 5, 2024 11:36
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.88%. Comparing base (af5e70d) to head (d1be4a6).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #75      +/-   ##
===========================================
+ Coverage    98.59%   98.88%   +0.28%     
===========================================
  Files           21       21              
  Lines          428      447      +19     
===========================================
+ Hits           422      442      +20     
+ Misses           6        5       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asuresh-code asuresh-code marked this pull request as ready for review December 9, 2024 13:39
@VKTB VKTB requested a review from rowan04 December 12, 2024 12:36
@VKTB
Copy link
Collaborator

VKTB commented Dec 16, 2024

@asuresh-code Could you please resolve the conflicts?

Copy link
Member

@rowan04 rowan04 left a comment

Choose a reason for hiding this comment

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

some comments, mainly on grammar and confusion

object_storage_api/services/image.py Outdated Show resolved Hide resolved
test/mock_data.py Show resolved Hide resolved
test/mock_data.py Show resolved Hide resolved
test/e2e/test_image.py Outdated Show resolved Hide resolved
test/e2e/test_image.py Outdated Show resolved Hide resolved
test/unit/repositories/test_image.py Outdated Show resolved Hide resolved
test/unit/services/test_image.py Outdated Show resolved Hide resolved
test/unit/services/test_image.py Outdated Show resolved Hide resolved
@rowan04
Copy link
Member

rowan04 commented Dec 18, 2024

When i tried it out, i tried to set ID as null, and whilst it didn't do it, it returned a 200 status code?
imageupdateendpoint

@asuresh-code
Copy link
Contributor Author

asuresh-code commented Dec 19, 2024

When i tried it out, i tried to set ID as null, and whilst it didn't do it, it returned a 200 status code? imageupdateendpoint

Was this on the docs on the localhost? I tried leaving the image_id blank (which is what I assume you mean by setting the ID to null) and it doesn't actually send a request (or get a response) , but it did show my previous response still (which was a successful response with a 200 code). This might be what's happening in your case as well? If you send an invalid response that gets a 404 response and then try setting the ID as null and do another request, I think it'll just display the previous 404 response.

@asuresh-code asuresh-code requested a review from rowan04 December 19, 2024 08:30
@rowan04
Copy link
Member

rowan04 commented Dec 19, 2024

Was this on the docs on the localhost? I tried leaving the image_id blank (which is what I assume you mean by setting the ID to null) and it doesn't actually send a request (or get a response) , but it did show my previous response still (which was a successful response with a 200 code). This might be what's happening in your case as well? If you send an invalid response that gets a 404 response and then try setting the ID as null and do another request, I think it'll just display the previous 404 response.

Discussed with Anikesh in person. The actual topic here is when adding extra info to the request body, such as "id" or even a made up field, it gets included in the Curl response, but then these extra fields don't get expected or returned in the response body, and a 200 status code is returned.

Copy link
Collaborator

@VKTB VKTB left a comment

Choose a reason for hiding this comment

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

LGTM

@VKTB VKTB requested a review from joelvdavies December 19, 2024 14:54
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.

Add an endpoint for editing image metadata
4 participants