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

fix: full resource names to resource names in names #879

Merged

Conversation

artek-koltun
Copy link
Contributor

@artek-koltun artek-koltun commented Jan 31, 2024

The full resource names are changed to resource names due to the following reasons:

  1. HTTP gateway sends resource names in that form
  2. Based on explanations from this patch: aip-dev/google.aip.dev@00e3ac7
  3. Aip-122 also mentions: Resources must expose a name field that contains its resource name. (they differentiate between resource name and full resource name)

As I understand, a full resource names are used when a field refers to resources in multiple APIs and ambiguity can arise. For example, if a field can refer to a book in a library API, a product in an e-commerce API, or a user in an authentication API, just using the relative resource name could lead to confusion. In this case, the field could refer to a book ID, a product ID, or a user ID, depending on the context. And to avoid this ambiguity, the full resource name should be used when a field refers to resources in multiple APIs. The full resource name clearly indicates which API the resource belongs to, making it clear whether foo refers to a book in the library API (//library.googleapis.com/publishers/foo), a product in the store API (//ecommerce.googleapis.com/products/foo), or a user in the let's say authentication API (//auth.googleapis.com/users/foo). It shouldn't be used in Names of our resources because the requests are sent to a dedicated known service //storage.opiproject.org/

Unblocks enabling of HTTP gateway #878

Need godpu patch to pass CI opiproject/godpu#437

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (55e38cf) 74.77% compared to head (ba9efab) 74.89%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #879      +/-   ##
==========================================
+ Coverage   74.77%   74.89%   +0.12%     
==========================================
  Files          40       40              
  Lines        3699     3693       -6     
==========================================
  Hits         2766     2766              
+ Misses        845      839       -6     
  Partials       88       88              

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

@artek-koltun artek-koltun merged commit 5d8b8d7 into opiproject:main Feb 1, 2024
18 checks passed
Signed-off-by: Artsiom Koltun <[email protected]>
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.

2 participants