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

Tabular connector refactoring #2404

Merged
merged 4 commits into from
May 15, 2024
Merged

Tabular connector refactoring #2404

merged 4 commits into from
May 15, 2024

Conversation

LucGenetier
Copy link
Contributor

no swagger
no v2
add ConnectorDataSource
get Dataset Metadata

@LucGenetier LucGenetier requested a review from a team as a code owner May 15, 2024 13:04
@LucGenetier
Copy link
Contributor Author

Public API changes:
❌CP0001 T:Microsoft.PowerFx.Connectors.Tabular.CdpTabularService
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.#ctor(Microsoft.OpenApi.Models.OpenApiDocument,System.Collections.Generic.IReadOnlyDictionary{System.String,Microsoft.PowerFx.Types.FormulaValue})
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.get_ConnectionId
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.get_Namespace
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.GetGlobalValueNames(Microsoft.OpenApi.Models.OpenApiDocument)
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.InitAsync(System.Net.Http.HttpClient,System.Threading.CancellationToken,Microsoft.PowerFx.Connectors.ConnectorLogger)
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.IsTabular(System.Collections.Generic.IReadOnlyDictionary{System.String,Microsoft.PowerFx.Types.FormulaValue},Microsoft.OpenApi.Models.OpenApiDocument,System.String@)
❌CP0007 T:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable
❌CP0017 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.GetItemsInternalAsync(System.IServiceProvider,Microsoft.PowerFx.Connectors.ODataParameters,System.Threading.CancellationToken)$1

MikeStall
MikeStall previously approved these changes May 15, 2024
Copy link
Contributor

@MikeStall MikeStall left a comment

Choose a reason for hiding this comment

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

:shipit:

@LucGenetier
Copy link
Contributor Author

Public API changes:
❌CP0001 T:Microsoft.PowerFx.Connectors.Tabular.CdpTabularService
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.#ctor(Microsoft.OpenApi.Models.OpenApiDocument,System.Collections.Generic.IReadOnlyDictionary{System.String,Microsoft.PowerFx.Types.FormulaValue})
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.get_ConnectionId
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.get_Namespace
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.GetGlobalValueNames(Microsoft.OpenApi.Models.OpenApiDocument)
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.InitAsync(System.Net.Http.HttpClient,System.Threading.CancellationToken,Microsoft.PowerFx.Connectors.ConnectorLogger)
❌CP0002 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.IsTabular(System.Collections.Generic.IReadOnlyDictionary{System.String,Microsoft.PowerFx.Types.FormulaValue},Microsoft.OpenApi.Models.OpenApiDocument,System.String@)
❌CP0007 T:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable
❌CP0017 M:Microsoft.PowerFx.Connectors.Tabular.ConnectorTable.GetItemsInternalAsync(System.IServiceProvider,Microsoft.PowerFx.Connectors.ODataParameters,System.Threading.CancellationToken)$1

Copy link
Contributor

@MikeStall MikeStall left a comment

Choose a reason for hiding this comment

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

:shipit:

@LucGenetier LucGenetier merged commit f1afe8c into main May 15, 2024
4 checks passed
RuntimeConfig rc = new RuntimeConfig(symbolValues).AddRuntimeContext(runtimeContext);
RuntimeConfig rc = new RuntimeConfig(symbolValues)
.AddService<ConnectorLogger>(logger)
.AddService<HttpClient>(client);
Copy link
Contributor

Choose a reason for hiding this comment

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

  .AddService<HttpClient>(client); [](http://example.com/codeflow?start=29&length=39)

This will be a problem. If we have 2 tables, they can compete over which httpClient this maps to.
HttpClient is too general of a type to use here. This was what BaseRuntimeConnectorContext was trying to solve.

Alternatively, I think the TableValue can just hold onto the client directly. (This is what Dataverse does)

Copy link
Contributor

Choose a reason for hiding this comment

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

Filed #2408 to followup

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.

None yet

2 participants