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

refactor!: modernize memory store and copy #89

Merged
merged 4 commits into from
Jan 2, 2024

Conversation

shizhMSFT
Copy link
Contributor

@shizhMSFT shizhMSFT commented Dec 29, 2023

What this PR does / why we need it

  • This PR scopes to memory target and copy
  • Modernize the code to utilize the latest feature of .NET 8.0 and C# 12 with nullable enabled
  • Refactor the code structure to match the oras-go repository while maintaining the dotnet naming conventions
  • Add ConfigureAwait(false) for library code
  • Renamed MemoryTarget to MemoryStore as one of the content store.

Which issue(s) this PR resolves / fixes

Related PR: #87

Please check the following list

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (6adeaaa) 72.24% compared to head (9cbbaca) 71.81%.

Files Patch % Lines
src/OrasProject.Oras/Content/MemoryStorage.cs 85.00% 2 Missing and 1 partial ⚠️
src/OrasProject.Oras/Content/MemoryStore.cs 82.35% 2 Missing and 1 partial ⚠️
src/OrasProject.Oras/Content/MemoryTagStore.cs 72.72% 2 Missing and 1 partial ⚠️
src/OrasProject.Oras/Extensions.cs 88.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   72.24%   71.81%   -0.44%     
==========================================
  Files          33       33              
  Lines        1027     1004      -23     
  Branches       91       88       -3     
==========================================
- Hits          742      721      -21     
  Misses        232      232              
+ Partials       53       51       -2     

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

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
@shizhMSFT shizhMSFT changed the title refactor!: modernize memory target and copy refactor!: modernize memory store and copy Dec 29, 2023
Wwwsylvia
Wwwsylvia previously approved these changes Jan 2, 2024
Copy link
Member

@Wwwsylvia Wwwsylvia left a comment

Choose a reason for hiding this comment

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

LGTM

@Wwwsylvia Wwwsylvia self-requested a review January 2, 2024 02:41
@Wwwsylvia
Copy link
Member

Wwwsylvia commented Jan 2, 2024

Wait a moment. Something was not in sync... Let me review it again.

@Wwwsylvia Wwwsylvia dismissed their stale review January 2, 2024 02:47

Reviewing it again.

Copy link
Member

@Wwwsylvia Wwwsylvia left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
@Wwwsylvia Wwwsylvia merged commit f2c16c2 into oras-project:main Jan 2, 2024
7 checks passed
@shizhMSFT shizhMSFT mentioned this pull request Jan 2, 2024
6 tasks
@shizhMSFT shizhMSFT deleted the refactor_memory branch January 2, 2024 03:28
@shizhMSFT shizhMSFT mentioned this pull request Jan 15, 2024
3 tasks
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