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

Store MethodInfo when creating an ActivityDefinition #369

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

tgrieger
Copy link
Contributor

What was changed

In order to access other attributes for a given activity, the MethodInfo used to create the activity is needed. There are only certain situations where a MethodInfo is used so the new property is added but made nullable.

Why?

The main reason is to allow activity interceptors to get reflection information about the method that is being called so it can use things like Attributes to make decisions, if needed.

Checklist

  1. Closes [Feature Request] Allow access to optional MethodInfo on ActivityDefinition #367

  2. How was this tested:

New tests are added to verify each public Create method properly sets or does not set the MethodInfo.

  1. Any docs updates needed?

In order to access other attributes for a given activity, the MethodInfo used to create the activity is needed. There are only certain situations where a MethodInfo is used so the new property is added but made nullable.

New tests are added to verify each public Create method properly sets or does not set the MethodInfo.
@CLAassistant
Copy link

CLAassistant commented Nov 22, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

This looks great, only a minor suggestion

@cretz cretz merged commit fe86f77 into temporalio:main Nov 25, 2024
8 checks passed
@cretz
Copy link
Member

cretz commented Nov 25, 2024

Thanks!

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.

[Feature Request] Allow access to optional MethodInfo on ActivityDefinition
3 participants