Skip to content

Fix missing components in Metadata API result. #5052

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

Merged
merged 2 commits into from
Aug 29, 2022

Conversation

tmacam
Copy link
Contributor

@tmacam tmacam commented Aug 20, 2022

Description

Dapr's GRPC Metadata API was never returning the list of registered components. That happened because the API object had a components attribute that was never assigned during API object construction - it received a getComponentsFn but that one was also never invoked.

This PR addresses this by aligning GRPC implementation for this method with its HTTP counterpart - removing the components attribute and using the getComponentsFn provided to the constructor
instead.

Fixes #5051

Issue reference

Please reference the issue this PR will close: #5051

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Unit tests passing
  • End-to-end tests passing
  • [ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
  • [ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
  • [ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@tmacam tmacam requested review from a team as code owners August 20, 2022 00:46
berndverst
berndverst previously approved these changes Aug 20, 2022
Copy link
Member

@berndverst berndverst left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Aug 20, 2022

Codecov Report

Merging #5052 (f6b2422) into master (29233c6) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head f6b2422 differs from pull request most recent head dbc3888. Consider uploading reports for the commit dbc3888 to get more accurate results

@@            Coverage Diff             @@
##           master    #5052      +/-   ##
==========================================
- Coverage   65.47%   65.46%   -0.02%     
==========================================
  Files         113      113              
  Lines       12723    12725       +2     
==========================================
- Hits         8331     8330       -1     
- Misses       3809     3811       +2     
- Partials      583      584       +1     
Impacted Files Coverage Δ
pkg/grpc/api.go 72.99% <100.00%> (+0.05%) ⬆️
pkg/actors/internal/placement.go 87.56% <0.00%> (-1.56%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@saber-wang
Copy link

Fixed #4963

@addjuarez
Copy link
Contributor

Looks fine, no problems here.

Dapr's GRPC Metadata API was never returning the list
of registered component. That happened because the API
object had a `components` attribute that was never assigned
during API construction - it received a `getComponentsFn`
but that one was also never invoked.

This PR addressed this by aligning its implementation with
its HTTP counterpart - removing the `components` attribute
and using the `getComponentsFn` provided to the constructor
instead.

Fixes dapr#5051

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
@artursouza artursouza merged commit 5c42e8f into dapr:master Aug 29, 2022
@tmacam tmacam deleted the MetadataMissingComponents_5051 branch August 31, 2022 00:06
Taction added a commit to Taction/dapr that referenced this pull request Sep 5, 2022
* master: (134 commits)
  Record metric for service updates (dapr#5114)
  chore: remove duplicate word in comments (dapr#5099)
  Run e2e tests in previous version of K8s on AKS to see if it's breaking Windows tests (dapr#5104)
  add {namespace} option to set consumerID
  Add tracing passthrough for bindings (dapr#5049)
  Improve component init error logs and metrics (dapr#4975)
  Improvements to E2E test apps (dapr#5042)
  Fix component name for aws dynamodb (dapr#5095)
  Fix perf tests not building (dapr#5096)
  Fix missing components in Metadata API result. (dapr#5052)
  Fixed log message (dapr#5088)
  Disable IPFS binding for now (dapr#5092)
  optimize/concurrency: pubsub concurrency map writes in runtime unit test. (dapr#5086)
  Configuration API response to use dictionaries - based on PR dapr#4695 (dapr#5083)
  correct compile error
  correct checking for actors with same id
  fix type error in print
  fix typo
  add log when actor start time and end time is not expected
  Components auto-registration (dapr#5062)
  ...

Signed-off-by: zhangchao <zchao9100@gmail.com>

# Conflicts:
#	go.mod
#	pkg/grpc/api.go
#	pkg/grpc/api_test.go
#	pkg/http/api.go
#	pkg/runtime/runtime.go
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.

Metadata API does not return components through GRPC
6 participants