Skip to content

Conversation

artur-ciocanu
Copy link
Contributor

Description

This is a tiny improvement adding a logger that can be retrieved from workflow activity context. This should give us the same API as workflow context.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1533

Checklist

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

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@artur-ciocanu
Copy link
Contributor Author

@dapr/maintainers-java-sdk could you please take a look, this is a very tiny PR, but will improve developer experience when working with workflows.

Artur Ciocanu added 2 commits August 30, 2025 16:58
Signed-off-by: Artur Ciocanu <[email protected]>
Artur Ciocanu added 5 commits August 30, 2025 22:27
Signed-off-by: Artur Ciocanu <[email protected]>
Signed-off-by: Artur Ciocanu <[email protected]>
Signed-off-by: Artur Ciocanu <[email protected]>
Copy link
Contributor

@javier-aliaga javier-aliaga left a comment

Choose a reason for hiding this comment

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

LGTM

@salaboy
Copy link
Collaborator

salaboy commented Sep 1, 2025

@artur-ciocanu I like this, but can we include this in the Spring Boot examples? So there is at least one example using the logger from the context inside an activity?

Copy link
Collaborator

@salaboy salaboy left a comment

Choose a reason for hiding this comment

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

@artur-ciocanu this is great, but per my comment, I would love to see this being used inside the spring-boot-examples/workflow , so at least we can see that it works all the way there.

@javier-aliaga
Copy link
Contributor

@salaboy can we get this in master? I am working on the crossactivity PR and would be nice to have it. I can create a follow up issue to track the springboot example

@salaboy
Copy link
Collaborator

salaboy commented Sep 1, 2025

let's do it

@salaboy salaboy merged commit 8803e0b into dapr:master Sep 1, 2025
13 of 14 checks passed
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.83%. Comparing base (d759c53) to head (3ace37c).
⚠️ Report is 213 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1534      +/-   ##
============================================
+ Coverage     76.91%   78.83%   +1.91%     
- Complexity     1592     1930     +338     
============================================
  Files           145      237      +92     
  Lines          4843     5938    +1095     
  Branches        562      611      +49     
============================================
+ Hits           3725     4681     +956     
- Misses          821      938     +117     
- Partials        297      319      +22     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@artur-ciocanu
Copy link
Contributor Author

@salaboy can we get this in master? I am working on the crossactivity PR and would be nice to have it. I can create a follow up issue to track the springboot example

Love it @javier-aliaga, that was the intent of this PR, I wanted to make sure that all the other workflow related functionality can rely on this.

Thanks @salaboy and @javier-aliaga!

@artur-ciocanu artur-ciocanu deleted the gh-1533 branch September 1, 2025 17:33
salaboy added a commit to salaboy/java-sdk that referenced this pull request Sep 2, 2025
* Adding logger to WorkflowActivityContext

Signed-off-by: Artur Ciocanu <[email protected]>

* Fixing a styling issue

Signed-off-by: Artur Ciocanu <[email protected]>

* Add unit tests for workflow activity context

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests to make Codecov happy

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve code coverage

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve test names

Signed-off-by: Artur Ciocanu <[email protected]>

---------

Signed-off-by: Artur Ciocanu <[email protected]>
Co-authored-by: Artur Ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
javier-aliaga pushed a commit to javier-aliaga/java-sdk that referenced this pull request Sep 2, 2025
* Adding logger to WorkflowActivityContext

Signed-off-by: Artur Ciocanu <[email protected]>

* Fixing a styling issue

Signed-off-by: Artur Ciocanu <[email protected]>

* Add unit tests for workflow activity context

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests to make Codecov happy

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve code coverage

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve test names

Signed-off-by: Artur Ciocanu <[email protected]>

---------

Signed-off-by: Artur Ciocanu <[email protected]>
Co-authored-by: Artur Ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
javier-aliaga pushed a commit to javier-aliaga/java-sdk that referenced this pull request Sep 2, 2025
* Adding logger to WorkflowActivityContext

Signed-off-by: Artur Ciocanu <[email protected]>

* Fixing a styling issue

Signed-off-by: Artur Ciocanu <[email protected]>

* Add unit tests for workflow activity context

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests to make Codecov happy

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve code coverage

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve test names

Signed-off-by: Artur Ciocanu <[email protected]>

---------

Signed-off-by: Artur Ciocanu <[email protected]>
Co-authored-by: Artur Ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>
javier-aliaga pushed a commit to javier-aliaga/java-sdk that referenced this pull request Sep 2, 2025
* Adding logger to WorkflowActivityContext

Signed-off-by: Artur Ciocanu <[email protected]>

* Fixing a styling issue

Signed-off-by: Artur Ciocanu <[email protected]>

* Add unit tests for workflow activity context

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests to make Codecov happy

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve code coverage

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve test names

Signed-off-by: Artur Ciocanu <[email protected]>

---------

Signed-off-by: Artur Ciocanu <[email protected]>
Co-authored-by: Artur Ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>
javier-aliaga pushed a commit to javier-aliaga/java-sdk that referenced this pull request Sep 2, 2025
* Adding logger to WorkflowActivityContext

Signed-off-by: Artur Ciocanu <[email protected]>

* Fixing a styling issue

Signed-off-by: Artur Ciocanu <[email protected]>

* Add unit tests for workflow activity context

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests to make Codecov happy

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve code coverage

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve test names

Signed-off-by: Artur Ciocanu <[email protected]>

---------

Signed-off-by: Artur Ciocanu <[email protected]>
Co-authored-by: Artur Ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>
salaboy added a commit that referenced this pull request Sep 3, 2025
* process deps too for dapr-spring (#1503)

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* Use camelCase on properties (#1470)

* Use camelCase on properties

Signed-off-by: Matheus Cruz <[email protected]>

* Add test for cameCalse properties

Signed-off-by: Matheus Cruz <[email protected]>

* Update daprdocs/content/en/java-sdk-docs/spring-boot/_index.md

Co-authored-by: Cassie Coyle <[email protected]>
Signed-off-by: Matheus Cruz <[email protected]>

---------

Signed-off-by: Matheus Cruz <[email protected]>
Signed-off-by: Matheus Cruz <[email protected]>
Co-authored-by: artur-ciocanu <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* fix script (#1506)

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* add support for custom status (#1505)

Signed-off-by: salaboy <[email protected]>
Co-authored-by: Siri Varma Vegiraju <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* try 1.5.7 (#1487)

Signed-off-by: Cassandra Coyle <[email protected]>
Co-authored-by: Siri Varma Vegiraju <[email protected]>
Co-authored-by: artur-ciocanu <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* rm protoc cmd from pom.xml (#1498)

* rm protoc cmd bc it uses a local protoc which might be the wrong version and results in a bad error

Signed-off-by: Cassandra Coyle <[email protected]>

* update protoc

Signed-off-by: Cassandra Coyle <[email protected]>

---------

Signed-off-by: Cassandra Coyle <[email protected]>
Co-authored-by: artur-ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* feat: Support registering activities with custom name (#1431)

* feat: Support register of activities with custom name

Signed-off-by: Javier Aliaga <[email protected]>

* chore: Apply suggestions

Signed-off-by: Javier Aliaga <[email protected]>

---------

Signed-off-by: Javier Aliaga <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* Bump codecov/codecov-action from 5.4.3 to 5.5.0 (#1513)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.3 to 5.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v5.4.3...v5.5.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cassie Coyle <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* commit: Fix validate job (#1524)

Signed-off-by: Javier Aliaga <[email protected]>

* chore: New task execution task id test (#1352) (#1526)

* chore: New task execution task id test

test how taskExecutionTaskId can be used for idempotency

* chore: Clean up not used files

* docs: Task execution keys

* test: Modify unit tests

* Remove new lines

---------

Signed-off-by: Javier Aliaga <[email protected]>
Signed-off-by: artur-ciocanu <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
Co-authored-by: artur-ciocanu <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* Bump actions/checkout from 4 to 5 (#1504)

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siri Varma Vegiraju <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* Improve CI runs (#1527)

* chore: Wait for dapr script

When running mechanical markdown examples wait for dapr to be running

Signed-off-by: Javier Aliaga <[email protected]>

* chore: Fix build ci

Signed-off-by: Javier Aliaga <[email protected]>

* chore: Fix build ci

Signed-off-by: Javier Aliaga <[email protected]>

---------

Signed-off-by: Javier Aliaga <[email protected]>
Co-authored-by: salaboy <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* Fix CVEs (#1529)

* chore: Read test certs from resources folder

This will avoid importing bouncy castle library just for tests

Signed-off-by: Javier Aliaga <[email protected]>

* ci: Split unit test and integration tests

Signed-off-by: Javier Aliaga <[email protected]>

---------

Signed-off-by: Javier Aliaga <[email protected]>

* fix: Use correct snapshot url (#1530)

Signed-off-by: Javier Aliaga <[email protected]>

* Bump actions/setup-java from 4 to 5 (#1512)

Signed-off-by: Javier Aliaga <[email protected]>

* chore: Bump dapr version (#1539)

* chore: Bump dapr version

Signed-off-by: Javier Aliaga <[email protected]>

* chore: Fix conversation tests

Only one response expected

Signed-off-by: Javier Aliaga <[email protected]>

---------

Signed-off-by: Javier Aliaga <[email protected]>

* Adding logger to WorkflowActivityContext (#1534)

* Adding logger to WorkflowActivityContext

Signed-off-by: Artur Ciocanu <[email protected]>

* Fixing a styling issue

Signed-off-by: Artur Ciocanu <[email protected]>

* Add unit tests for workflow activity context

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests to make Codecov happy

Signed-off-by: Artur Ciocanu <[email protected]>

* Add more unit tests

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve code coverage

Signed-off-by: Artur Ciocanu <[email protected]>

* Improve test names

Signed-off-by: Artur Ciocanu <[email protected]>

---------

Signed-off-by: Artur Ciocanu <[email protected]>
Co-authored-by: Artur Ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* Use notimestamp in Javadoc Plugin to disable timestamps in Javadocs (#1538)

Signed-off-by: Javier Aliaga <[email protected]>

* Feat Cross App CallActivity (#1468)

* cross app ex

Signed-off-by: Cassandra Coyle <[email protected]>

* update protoc cmd

Signed-off-by: Cassandra Coyle <[email protected]>

* feedback

Signed-off-by: Cassandra Coyle <[email protected]>

* builder pattern

Signed-off-by: Cassandra Coyle <[email protected]>

* fix protoc

Signed-off-by: Cassandra Coyle <[email protected]>

* debug log levels for test containers

Signed-off-by: Cassandra Coyle <[email protected]>

* update readme and add debugging info

Signed-off-by: Cassandra Coyle <[email protected]>

* add IT test for cross app call activity

Signed-off-by: Cassandra Coyle <[email protected]>

* cleanup test

Signed-off-by: Cassandra Coyle <[email protected]>

* sysout -> ctx.logger

Signed-off-by: Cassandra Coyle <[email protected]>

* reset pom

Signed-off-by: Cassandra Coyle <[email protected]>

* rm debug lines from readme

Signed-off-by: Cassandra Coyle <[email protected]>

* fix header + rm customports

Signed-off-by: Cassandra Coyle <[email protected]>

* use consts

Signed-off-by: Cassandra Coyle <[email protected]>

* rm waitfor call

Signed-off-by: Cassandra Coyle <[email protected]>

* rm pubsub

Signed-off-by: Cassandra Coyle <[email protected]>

* rm timeout

Signed-off-by: Cassandra Coyle <[email protected]>

* reset empty lines added

Signed-off-by: Cassandra Coyle <[email protected]>

* reset appname for daprcontainer

Signed-off-by: Cassandra Coyle <[email protected]>

* reset empty line diff

Signed-off-by: Cassandra Coyle <[email protected]>

* rm constructor info from readme

Signed-off-by: Cassandra Coyle <[email protected]>

* debug -> info

Signed-off-by: Cassandra Coyle <[email protected]>

* rm super.start

Signed-off-by: Cassandra Coyle <[email protected]>

* reset dapr container diff

Signed-off-by: Cassandra Coyle <[email protected]>

* add test for codecov

Signed-off-by: Cassandra Coyle <[email protected]>

* up timeout time to unblock PR

Signed-off-by: Cassandra Coyle <[email protected]>

* deps: Update durabletask-client to 1.5.10

Signed-off-by: Javier Aliaga <[email protected]>

* ci: Revert build timeout

Signed-off-by: Javier Aliaga <[email protected]>

* review: Use ctx.getLogger

Signed-off-by: Javier Aliaga <[email protected]>

* chore: Fix review comments

Signed-off-by: Javier Aliaga <[email protected]>

* chore: more review comments fixes

Signed-off-by: Javier Aliaga <[email protected]>

* test: Use testcontainers in CrossApp IT test

Signed-off-by: Javier Aliaga <[email protected]>

* chore: Load classpath for IT with all dependencies

Signed-off-by: Javier Aliaga <[email protected]>

---------

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>
Co-authored-by: Javier Aliaga <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* Release 1.16.0-rc-1

Signed-off-by: Dapr Bot <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* process deps too for dapr-spring (#1502)

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>

* chore: Alpha components to stable

Signed-off-by: Javier Aliaga <[email protected]>

---------

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: Javier Aliaga <[email protected]>
Signed-off-by: Matheus Cruz <[email protected]>
Signed-off-by: Matheus Cruz <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: artur-ciocanu <[email protected]>
Signed-off-by: Artur Ciocanu <[email protected]>
Signed-off-by: Dapr Bot <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
Co-authored-by: Matheus Cruz <[email protected]>
Co-authored-by: artur-ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
Co-authored-by: Siri Varma Vegiraju <[email protected]>
Co-authored-by: Dapr Bot <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Artur Ciocanu <[email protected]>
Co-authored-by: Dapr Bot <[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.

Add logger to workflow activity context
3 participants