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

S3: Days must not be provided for select request when restoring object #7468

Merged

Conversation

tsugumi-sys
Copy link
Contributor

@tsugumi-sys tsugumi-sys commented Mar 14, 2024

  • Raise error when both Days and Type parameters exist in restore object request.

image
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/restore_object.html

related: #7467

@@ -2272,10 +2272,19 @@ def _key_response_post(
)

elif "restore" in query:
es = minidom.parseString(body).getElementsByTagName("Days")
days = es[0].childNodes[0].wholeText
params = minidom.parseString(body)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any value in using xmltodict here? We use it somewhere else in this file as well.

I don't know what the output for that would look like, but maybe it's easier than parsing the XML manually.

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.81%. Comparing base (9aef694) to head (2d77f19).
Report is 103 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7468      +/-   ##
==========================================
- Coverage   95.88%   95.81%   -0.08%     
==========================================
  Files         843      854      +11     
  Lines       82578    84012    +1434     
==========================================
+ Hits        79178    80492    +1314     
- Misses       3400     3520     +120     
Flag Coverage Δ
servertests 32.22% <43.75%> (-0.30%) ⬇️
unittests 95.77% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@bblommers bblommers added this to the 5.0.4 milestone Mar 15, 2024
Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

Nice one - thank you!

@bblommers bblommers merged commit 6e0b4c6 into getmoto:master Mar 15, 2024
40 checks passed
Copy link
Contributor

This is now part of moto >= 5.0.4.dev16

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.

None yet

2 participants