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

Metadata API: report actor runtime status #7040

Merged
merged 56 commits into from Nov 27, 2023

Conversation

ItalyPaleAle
Copy link
Contributor

@ItalyPaleAle ItalyPaleAle commented Oct 14, 2023

I promise this PR is not actually 1,600 LOCs! Almost all of them are due to changes in the generated proto files, which are huge for some reason

Updates the metadata API to include additional information on the actor runtime and its status. This is helpful to understand if the actor runtime has completed the initialization, whether the actor runtime is an actor host or just an actor client, and whether the connection with the placement service is active.

Examples (only added data is shown):

  1. While the (actor) runtime is initializing (i.e. before the request for /dapr/config has been completed):

    {
      "actorRuntime": {
         "runtimeStatus": "INITIALIZING",
         "hostReady": false
       }
    }
  2. Actor runtime has initialized and the app is hosting actors:

    {
      "actorRuntime": {
        "runtimeStatus": "RUNNING",
        "activeActors": [
          {
            "type": "actor-1",
            "count": 1
          },
          {
            "type": "actor-2"
          }
        ],
        "hostReady": true,
        "placement": "placement: connected"
      }
    }
  3. Actor runtime has initialized as actor client only (e.g. there's no "actorStateStore" configured):

    {
      "actorRuntime": {
        "runtimeStatus": "RUNNING",
        "hostReady": false,
        "placement": "placement: connected"
      }
    }
  4. Actor runtime has initialized but connection to placement is down:

    {
      "actorRuntime": {
        "runtimeStatus": "RUNNING",
        "activeActors": [
          {
            "type": "actor-1",
            "count": 1
          },
          {
            "type": "actor-2"
          }
        ],
        "hostReady": false,
        "placement": "placement: disconnected"
      }
    }
  5. Actor runtime is disabled (no placement-host-address option)

    {
      "actorRuntime": {
        "runtimeStatus": "DISABLED",
        "hostReady": false
      }
    }

The actorRuntime.activeActors property is an alias of the pre-existing actors property, which contains a count of active actors. The old property is deprecated but not removed for backwards-compatibility (so the data is included twice, at least for now).

@ItalyPaleAle ItalyPaleAle requested review from a team as code owners October 14, 2023 18:49
@ItalyPaleAle ItalyPaleAle added the autoupdate DaprBot will keep the Pull Request up to date with master branch label Oct 16, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

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

Comparison is base (4d626ca) 64.62% compared to head (6e490c8) 64.55%.

Files Patch % Lines
pkg/actors/actors_mock.go 0.00% 13 Missing ⚠️
pkg/actors/actors.go 0.00% 6 Missing ⚠️
pkg/actors/placement/placement.go 0.00% 4 Missing ⚠️
pkg/grpc/universalapi/api_metadata.go 60.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7040      +/-   ##
==========================================
- Coverage   64.62%   64.55%   -0.08%     
==========================================
  Files         225      225              
  Lines       21023    21050      +27     
==========================================
+ Hits        13587    13588       +1     
- Misses       6278     6299      +21     
- Partials     1158     1163       +5     

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
dapr/proto/runtime/v1/dapr.proto Outdated Show resolved Hide resolved
dapr/proto/runtime/v1/dapr.proto Show resolved Hide resolved
tests/integration/suite/actors/metadata/actor_client.go Outdated Show resolved Hide resolved
pkg/actors/actors.go Outdated Show resolved Hide resolved
dapr-bot and others added 2 commits October 20, 2023 03:52
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
mukundansundar
mukundansundar previously approved these changes Oct 20, 2023
Copy link
Contributor

@mukundansundar mukundansundar left a comment

Choose a reason for hiding this comment

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

lgtm

@mukundansundar mukundansundar added this to the v1.13 milestone Oct 21, 2023
@mukundansundar
Copy link
Contributor

/ok-to-test

@mukundansundar
Copy link
Contributor

/test-sdk-all

@mukundansundar
Copy link
Contributor

/test-version-skew

@dapr-bot
Copy link
Collaborator

dapr-bot commented Oct 21, 2023

Dapr E2E test

🔗 Link to Action run

Commit ref: 2c8162b

✅ Build succeeded for linux/amd64

  • Image tag: dapre2e4942d80812l
  • Test image tag: dapre2e4942d80812l

✅ Infrastructure deployed

Cluster Resource group name Azure region
Linux Dapr-E2E-dapre2e4942d80812l westus3
Windows Dapr-E2E-dapre2e4942d80812w westus3
Linux/arm64 Dapr-E2E-dapre2e4942d80812la eastus

✅ Build succeeded for windows/amd64

  • Image tag: dapre2e4942d80812w
  • Test image tag: dapre2e4942d80812w

❌ Tests failed on windows/amd64

Please check the logs for details on the error.

✅ Tests succeeded on linux/amd64

  • Image tag: dapre2e4942d80812l
  • Test image tag: dapre2e4942d80812l

@dapr-bot
Copy link
Collaborator

dapr-bot commented Oct 21, 2023

Dapr SDK Go test

🔗 Link to Action run

Commit ref: 2c8162b

✅ Go SDK tests passed

@dapr-bot
Copy link
Collaborator

dapr-bot commented Oct 21, 2023

Dapr SDK Python test

🔗 Link to Action run

Commit ref: 2c8162b

✅ Python SDK tests passed

@dapr-bot
Copy link
Collaborator

dapr-bot commented Oct 21, 2023

Dapr SDK Java test

🔗 Link to Action run

Commit ref: 2c8162b

❌ Java SDK tests failed

Please check the logs for details on the error.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Oct 21, 2023

Dapr Version Skew test (control-plane-master - 1.12.0)

🔗 Link to Action run

Commit ref: 2c8162b

✅ Version Skew tests passed

@dapr-bot
Copy link
Collaborator

dapr-bot commented Oct 21, 2023

Dapr Version Skew test (dapr-sidecar-master - 1.12.0)

🔗 Link to Action run

Commit ref: 2c8162b

❌ Version Skew tests failed

Please check the logs for details on the error.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Oct 21, 2023

Dapr SDK JS test

🔗 Link to Action run

Commit ref: 2c8162b

✅ JS SDK tests passed

mukundansundar
mukundansundar previously approved these changes Nov 20, 2023
@mukundansundar
Copy link
Contributor

/ok-to-test

@dapr-bot
Copy link
Collaborator

dapr-bot commented Nov 20, 2023

Dapr E2E test

🔗 Link to Action run

Commit ref: 3e49978

✅ Build succeeded for linux/amd64

  • Image tag: dapre2e6c5bda35f7l
  • Test image tag: dapre2e6c5bda35f7l

✅ Infrastructure deployed

Cluster Resource group name Azure region
Linux Dapr-E2E-dapre2e6c5bda35f7l westus3
Windows Dapr-E2E-dapre2e6c5bda35f7w westus3
Linux/arm64 Dapr-E2E-dapre2e6c5bda35f7la eastus

✅ Build succeeded for windows/amd64

  • Image tag: dapre2e6c5bda35f7w
  • Test image tag: dapre2e6c5bda35f7w

✅ Tests succeeded on windows/amd64

  • Image tag: dapre2e6c5bda35f7w
  • Test image tag: dapre2e6c5bda35f7w

✅ Tests succeeded on linux/amd64

  • Image tag: dapre2e6c5bda35f7l
  • Test image tag: dapre2e6c5bda35f7l

@mukundansundar mukundansundar added the automerge Allows DaprBot to automerge and update PR if all approvals are in place label Nov 21, 2023
…ctor-status

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
@mukundansundar mukundansundar merged commit 9189949 into dapr:master Nov 27, 2023
20 of 22 checks passed
@ItalyPaleAle ItalyPaleAle deleted the metadata-actor-status branch November 27, 2023 18:23
JoshVanL pushed a commit to JoshVanL/dapr that referenced this pull request Dec 14, 2023
* Metadata API: report actor runtime status

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Added integration tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Changed per review feedback

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Address review feedback 1

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Address review feedback 2

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Renamed to WithInMemoryActorStateStore

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Added comments

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

---------

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Allows DaprBot to automerge and update PR if all approvals are in place autoupdate DaprBot will keep the Pull Request up to date with master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants