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

Python API: disable autocreate feature on demand #1462

Merged
merged 5 commits into from
May 9, 2018

Conversation

murlock
Copy link
Contributor

@murlock murlock commented May 6, 2018

SUMMARY

The autocreate feature on API Python was hardcoded

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

Python API

SDS VERSION
openio 4.1.23.dev20
ADDITIONAL INFORMATION

Default value of autocreate option is still True to avoid breaking backward compat

@codecov-io
Copy link

codecov-io commented May 6, 2018

Codecov Report

Merging #1462 into 4.1.x will decrease coverage by 0.27%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##            4.1.x    #1462      +/-   ##
==========================================
- Coverage   77.46%   77.18%   -0.28%     
==========================================
  Files         309      309              
  Lines       58142    58167      +25     
  Branches     6823     6823              
==========================================
- Hits        45040    44898     -142     
+ Misses      12955    12910      -45     
- Partials      147      359     +212
Impacted Files Coverage Δ
oio/container/client.py 69.28% <ø> (ø) ⬆️
tests/functional/cli/storage/test_obj.py 100% <100%> (ø) ⬆️
oio/cli/storage/obj.py 24.17% <100%> (+0.64%) ⬆️
tests/functional/api/test_objectstorage.py 96.53% <100%> (+0.09%) ⬆️
oio/api/object_storage.py 80.6% <100%> (+0.09%) ⬆️
sqliterepo/restoration.c 74.07% <0%> (-14.82%) ⬇️
sqliterepo/synchro.c 57.22% <0%> (-8.39%) ⬇️
sqliterepo/gridd_client_pool.c 71.16% <0%> (-7.45%) ⬇️
sqliterepo/replication.c 81.08% <0%> (-6.02%) ⬇️
sqliterepo/replication_dispatcher.c 47.86% <0%> (-3.79%) ⬇️
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b42ca5c...c05daac. Read the comment docs.

@@ -324,7 +324,7 @@ class ObjectStorageApi(object):
- `write_timeout`: `float`
"""
TIMEOUT_KEYS = ('connection_timeout', 'read_timeout', 'write_timeout')
EXTRA_KEYWORDS = ('chunk_checksum_algo', )
EXTRA_KEYWORDS = ('chunk_checksum_algo', 'autocreate', )
Copy link
Member

Choose a reason for hiding this comment

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

I think the last comma is useless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -344,7 +344,10 @@ def __init__(self, namespace, logger=None, **kwargs):
for all HTTP based APIs (except rawx)
:type pool_manager: `urllib3.PoolManager`
:keyword chunk_checksum_algo: algorithm to use for chunk checksums.
Only 'md5' and `None` are supported at the moment.
Only 'md5' aend `None` are supported at the moment.
Copy link
Member

Choose a reason for hiding this comment

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

aend --> and

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Previously, autocreate was forced to True.

Parameter is now exposed on API side and default value is True for
backward compatibility.
@murlock murlock force-pushed the 4.1.x_allow_disabled_autocreate branch from 3ee0ff5 to c05daac Compare May 7, 2018 07:38
@fvennetier fvennetier changed the title Python: Allow disable autocreate feature Python API: disable autocreate feature on demand May 9, 2018
@fvennetier fvennetier merged commit 04d8e7d into open-io:4.1.x May 9, 2018
@murlock murlock deleted the 4.1.x_allow_disabled_autocreate branch June 13, 2018 13:48
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