Skip to content

[FormRecognizer] Updated LROs to use new OperationInternal class#22629

Merged
kinelski merged 9 commits intoAzure:mainfrom
kinelski:fr-lro
Jul 14, 2021
Merged

[FormRecognizer] Updated LROs to use new OperationInternal class#22629
kinelski merged 9 commits intoAzure:mainfrom
kinelski:fr-lro

Conversation

@kinelski
Copy link
Copy Markdown
Contributor

No description provided.

@kinelski kinelski added Client This issue is related to a non-management package Cognitive - Form Recognizer labels Jul 13, 2021
@kinelski kinelski requested a review from maririos July 13, 2021 20:27
@kinelski kinelski self-assigned this Jul 13, 2021
@kinelski kinelski requested a review from annelo-msft as a code owner July 13, 2021 20:27
@kinelski
Copy link
Copy Markdown
Contributor Author

/azp run net - formrecognizer - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

_serviceClient = allOperations;
_diagnostics = diagnostics;
_serviceVersion = serviceVersion;
_operationInternal = new(_diagnostics, this, rawResponse: null, nameof(CreateCustomFormModelOperation));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since TrainingOperation and CreateComposedModelOperation are subclasses of CreateCustomFormModelOperation, the three of them generate a diagnostic scope with name CreateCustomFormModelOperation.UpdateStatus during update.

This is not the behavior I was expecting, though. I think it would make more sense for each of them to generate an <operation-name>.UpdateStatus scope, according to the name of each class (that's what the OperationInternal class does by default).

We're passing the nameof(CreateCustomFormModelOperation) argument here to set the scope name manually and make sure the original behavior is kept. Should we consider changing it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ohhh this is great! Do you know if this is a breaking change? or if we put a note in our changelog as bug fix will it be ok?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Strictly speaking, it is a breaking change, but to tell you the truth I'm not familiar with diagnostics so I don't know how users are expected to use this data. We may need to check with architects. I'll create an issue so we don't forget it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

@maririos maririos left a comment

Choose a reason for hiding this comment

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

Just as a safety check, could u run the live tests too?

_serviceClient = allOperations;
_diagnostics = diagnostics;
_serviceVersion = serviceVersion;
_operationInternal = new(_diagnostics, this, rawResponse: null, nameof(CreateCustomFormModelOperation));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ohhh this is great! Do you know if this is a breaking change? or if we put a note in our changelog as bug fix will it be ok?

@kinelski
Copy link
Copy Markdown
Contributor Author

/azp run net - formrecognizer - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kinelski
Copy link
Copy Markdown
Contributor Author

All live tests succeeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Client This issue is related to a non-management package Cognitive - Form Recognizer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants