[MetricsAdvisor] CreateDataFeed takes a whole DataFeed; DataSource property added to DataFeed #16366
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding a
DataSource
property toDataFeed
made some restructuring necessary. We are not keeping an internalDataFeedDetail
instance anymore. Instead, a newDataFeedDetail
is built right before we serialize the model and send it to the service.These three possible scenarios are being covered:
DataFeed
object and callsCreateDataFeed
.DataFeed.GetDataFeedDetail
is called to build aDataFeedDetail
from scratch. It goes as follows:DataFeedSource.InstantiateDataFeedDetail
is made to get the rightDataFeedDetail
derived class to build (AzureBlobDataFeed
, for instance).DataFeed
.DataFeed
object and callsUpdateDataFeed
.DataFeed.GetPatchModel
is called to build aDataFeedDetailPatch
from scratch. It goes as follows:DataFeedSource.InstantiateDataFeedDetailPatch
is made to get the rightDataFeedDetailPatch
derived class to build (AzureBlobDataFeedPatch
, for instance).DataFeed
.GetDataFeed
and a newDataFeed
object must be built fromDataFeedDetail
. There are no major changes in the behavior, but we now need to be able to build aDataFeedSource
from theDataFeedDetail
returned by the service. The static methodDataFeedSource.GetDataFeedSource
was created for this purpose.Fixes #16170.
Fixes #16313.