-
Notifications
You must be signed in to change notification settings - Fork 272
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
Backwards compatibility for orchestrationClient #1295
Conversation
Hmm, I see a few too many commits being pushed. Perhaps I pulled from the wrong source? Sorry about that, I'll look into fixing that next! I suppose I should not have merged from |
Yeah, that's definitely weird. I typically see it if by branches aren't fully up-to-date. I don't yet really understand what causes it though. One thing I would suggest is to exclude your changes under the |
Also, it looks like the AppVeyor build is failing due to the usage of an obsolete API.
We should suppress that warning in the source code since we're doing this intentionally. I think Visual Studio should have some tool tips to help suppress warnings in source code. |
After a lot of work trying to fix my git state, the diff appears correct now. Sorry for the clutter folks, I'll be more careful next time. My mistake was to accidentally pull from master and to repeatedly fail to perform a |
Glad to see everything is working! :) However, I'm still a little concerned about the Git history represented in this PR. If you're certain that your local branch is good, would you mind locally squashing your changes and doing a force push to make sure that GitHub also thinks things are looking clean? I imaging the following commands could work for you assuming your branch is in a sane state. They will do the following:
git checkout dev
git pull
git checkout djusto/backwards_compatibility
git rebase dev
git reset --soft 4b81619ddd31043f63a1e351e33367c8de65f368
git commit -m "Backwards compatibility for orchestrationClient"
git push --force |
89b3181
to
f07f5f1
Compare
@cgillum , thanks for the helpful commands and their explanation. I spent a little bit of time today also reading up on how to get out of these bad git states. Anyhow, it should be looking better now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! This looks perfect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as long as it's tested. :)
I have one question, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So historically I have had issues with binding rules and inheritence, but it was a slightly different context, so I think you are OK here.
In that case, I had a GraphTokenAttribute
that bound to a string, and then ExcelAttribute
which was a subclass of GraphTokenAttribute
that bound to a completely different set of type. Based on the order of the rules I configured, it would sometimes try binding ExcelAttribute
as GraphTokenAttribute
, and error out as the signature did not match.
Since DurableClientAttribute
and OrchestrationClientAttribute
should bind the exact same way, I think you are safe here. However, as Amanda pointed out, I think that means you can get rid of the backwardsCompRule
entirely.
As for testing, I would try to test the following matrix:
Test both DurableClientAttribute and OrchestrationClientAttribute.
Test both "durableClient" and "orchestrationClient" as "type"
values in a function.json based function app.
If you test those 4 scenarios, and they all work as expected, then I give this the green light!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the new details I learned, I would say this is ready to merge once you have tested the scenarios I outlined in my previous review!
My latest commit(s) adds rather simple unit tests as a sanity check that my changes work. They are slight variants on already existing tests for the I also manually tested the usage of I'll wait for another 'lgtm' and them I'll squash-and-merge. Thanks folks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good to merge for me. One small nit, but not a blocker.
This PR addresses: #1290
There changes are few and simple (except I apparently pushed other people's commits, more on this later):
DurableClientAttribute
is no longer asealed
class, so we can subclass it.The declaration of a new dummy subclass of
DurableClientAttribute
namedOrchestrationClientAttribute
A new binding rule in
DurableTaskExtension.cs
that explicitly acceptsOrchestrationClientAttribute
. This solution is less than ideal, because there's a handful of copy-pasted lines from the rule acceptingDurableClientAttribute
. Ideally, we would have a single line allowing us to select between the two attributes. If anyone knows how to do this, please let me knowSo, while this works, I'm still looking for a solution with less repetition. I'm open to input!
Finally, in #1290 we discuss the possibility of raising warnings on the logs of
func host start
for JS users usingorchestrationClient
instead ofdurableClient
. This PR assumes that this is change we would implement exclusively on the JS side of things. If this is not the case, please let me know.