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

[Storage] Replace Azure CLI with python SDK #638

Merged
merged 2 commits into from
Sep 15, 2023
Merged

Conversation

rzvoncek
Copy link
Contributor

@rzvoncek rzvoncek commented Sep 13, 2023

Fixes #628.
Fixes #637.

@rzvoncek rzvoncek changed the title [Storage] WIP Replace Azure CLI with python SDK [Storage] Replace Azure CLI with python SDK Sep 13, 2023
@rzvoncek rzvoncek marked this pull request as ready for review September 13, 2023 13:37
@rzvoncek
Copy link
Contributor Author

Rebased on the recent master.

Copy link
Contributor

@adejanovski adejanovski left a comment

Choose a reason for hiding this comment

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

One tiny change request and a refactoring ticket suggestion, then we should be good for a merge.

name=object_key,
data=data,
overwrite=True,
max_concurrency=4,
Copy link
Contributor

Choose a reason for hiding this comment

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

Todo: after doing some benchmarks, it looks like 16 gives us better performance. Could you set this value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed a change.

max_workers=self.config.concurrent_transfers,
multi_part_upload_threshold=int(self.config.multi_part_upload_threshold)
)
def _get_or_create_event_loop(self) -> asyncio.AbstractEventLoop:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: this seems to be repeated in all the storage classes, maybe we could refactor it to have a single version that all storage classes will use? In the abstract storage possibly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's indeed repeated, I'll be pushing a different PR fixing this.

@sonarcloud
Copy link

sonarcloud bot commented Sep 15, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

No Coverage information No Coverage information
17.4% 17.4% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #638 (209e222) into master (e02afe1) will decrease coverage by 0.02%.
The diff coverage is 93.56%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #638      +/-   ##
==========================================
- Coverage   80.99%   80.97%   -0.02%     
==========================================
  Files          55       53       -2     
  Lines        4666     4652      -14     
  Branches      623      661      +38     
==========================================
- Hits         3779     3767      -12     
+ Misses        861      857       -4     
- Partials       26       28       +2     
Files Changed Coverage Δ
medusa/storage/azure_storage.py 93.29% <93.56%> (+5.06%) ⬆️

... and 5 files with indirect coverage changes

@rzvoncek rzvoncek merged commit 6f9452e into master Sep 15, 2023
27 of 28 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
2 participants