Coder Social home page Coder Social logo

oras-dotnet's People

Contributors

dependabot[bot] avatar sajayantony avatar sammychinedu2ky avatar shizhmsft avatar wangxiaoxuan273 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oras-dotnet's Issues

FetchReferenceAsync throws exception when tag is provided as a reference

Calling FetchReferenceAsync with a tag as a reference, e.g., registryhost.com/myrepository/test:latest, erroneously throws a System.InvalidOperationException: 'The given header was not found.' if the registry server fails to include the Docker-Content-Digest in the response.
image

Per the OCI Distribution spec (link) this is a legacy header and is optional. Container services, such as AWS's Elastic Container Registry, do not supply this header and thus fail with the .NET version of the Oras library. NOTE: the Go version of this library functions correctly and does not exhibit this error.

The issue stems from an unhandled except in Oras.Remote.ManifestStore.GenerateDescriptor here. The call to GetValues on line 642 will throw an exception of the specified header is cannot be found (reference). Additionally, the call to First in the subsequence line will also throw an exception if serverHeaderDigest is null.
image

A workaround is to change this call to used TryGetValues instead and check for call prior to calling First, as in the following:
image

With this change, the code executes in a manner consistent with the Go version of the Oras library.

Provide .NET SDK for ORAS

What is the version of your ORAS CLI

v0.16.0

What would you like to be added?

ORAS has Python and Golang SDK that allow developers to build their own clients on top of one of the libraries. Similarly, developing a .NET SDK will enable .Net developers to use ORAS API and enhance the ORAS ecosystem.

This issue is open for the CNCF LFX Mentorship 2023 program. If you are interested in implementing this issue, please let us know.

Why is this needed for ORAS?

Enable .Net developers to use ORAS API and enhance the ORAS ecosystem.

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

Versioned API documentation

The current API documentation is for the main branch.

It is better to have versioned API documentation and URL links.

Roadmap to Production

Here's the roadmap of basic functionalities for oras-dotnet to be involved for production use.

  • Feature development
    • Models
      • Model Content Addressable Storage (CAS)
      • Model Tagging (TagResolver)
      • Model Target
      • Model Repository
      • Model Registry
    • Targets & Functions
      • Implement Memory Target
      • #37
      • Implement Remote Repository
      • Implement Remote Registry
      • Copy graphs between Targets
      • #39
    • Utilities
    • Auth
    • Performance
  • Build & release
  • Repository maintenance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.