Fix validations using the latest CLI#814
Conversation
…rom the CLI Signed-off-by: Albert Callarisa <albert@diagrid.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #814 +/- ##
=======================================
Coverage 54.64% 54.64%
=======================================
Files 51 51
Lines 3466 3466
=======================================
Hits 1894 1894
Misses 1433 1433
Partials 139 139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
|
Reopened multiple times to run CI. So far it's been green in all triggers |
mikeee
left a comment
There was a problem hiding this comment.
Lgtm, feel free to ping me for reruns in the future
There was a problem hiding this comment.
Pull request overview
This PR updates all example applications and their README validation files to be compatible with the latest Dapr CLI, which removed the == APP == prefix from application stdout output (see dapr/cli#1595). The changes ensure that example validations continue to pass by removing the prefix from assertions, switching logging from stderr to stdout, and improving test reliability with retry mechanisms.
Changes:
- Replaced all
log.*calls with a customlogger = log.New(os.Stdout, "", log.LstdFlags)in example Go files to ensure output goes to stdout instead of stderr. - Removed
== APP ==prefix from allexpected_stdout_linesand Result sections in README markdown files. - Improved test reliability by adding retry logic to client examples (service, grpc-service, pubsub) and wrapping cleanup commands in proper
<!-- STEP -->blocks.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/workflow/main.go | Switch log.* to logger.* (stdout) |
| examples/workflow/README.md | Remove == APP == from assertions and results |
| examples/workflow-taskexecutionid/main.go | Switch log.* to logger.* (stdout) |
| examples/workflow-taskexecutionid/README.md | Remove == APP == from assertions and results |
| examples/workflow-parallel/main.go | Switch log.* to logger.* (stdout) |
| examples/workflow-parallel/README.md | Remove == APP == from assertions and results |
| examples/streamsub/sub/sub.go | Switch log.* to logger.* (stdout) |
| examples/streamsub/pub/pub.go | Switch log.* to logger.* (stdout) |
| examples/streamsub/README.md | Remove == APP == from result output |
| examples/service/serving/http/main.go | Switch log.* to logger.* (stdout) |
| examples/service/serving/grpc/main.go | Switch log.* to logger.* (stdout) |
| examples/service/client/main.go | Add retry loop for service invocation |
| examples/service/README.md | Remove == APP ==, remove background/sleep, add cleanup step |
| examples/pubsub/sub/sub.go | Switch log.* to logger.* (stdout) |
| examples/pubsub/pub/pub.go | Add TCP wait loop for subscriber readiness |
| examples/pubsub/README.md | Remove == APP ==, remove background/sleep, add cleanup step |
| examples/jobs/main.go | Switch log.* to logger.* (stdout) |
| examples/hello-world/README.md | Remove == APP == from assertions |
| examples/grpc-service/server/main.go | Switch log.* to logger.* (stdout) |
| examples/grpc-service/client/main.go | Switch log.* to logger.*, add retry loop |
| examples/grpc-service/README.md | Remove == APP ==, remove background/sleep, add cleanup step |
| examples/crypto/main.go | Switch log.* to logger.* (stdout) |
| examples/crypto/README.md | Remove == APP == from assertions and results |
| examples/conversation-alpha2/main.go | Switch log.* to logger.* (stdout) |
| examples/conversation-alpha2/README.md | Remove == APP == from assertions and results |
| examples/conversation-alpha1/main.go | Switch log.* to logger.* (stdout) |
| examples/conversation-alpha1/README.md | Remove == APP == from assertions and results |
| examples/configuration/README.md | Remove == APP == from assertions, trailing whitespace cleanup |
| examples/actor/serving/main.go | Switch log.* to logger.* (stdout) |
| examples/actor/README.md | Remove == APP ==, remove background/sleep, add cleanup step |
| examples/socket/README.md | Remove == APP == from assertions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Signed-off-by: Albert Callarisa <albert@diagrid.io>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Albert Callarisa <albert@diagrid.io>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove
== APP ==from validation assertions, as it's been removed from the CLI (PR)