-
Notifications
You must be signed in to change notification settings - Fork 331
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
Issue 2780 #2785
base: main
Are you sure you want to change the base?
Issue 2780 #2785
Conversation
DatasetMetadata = await GetDatasetsMetadataAsync(httpClient, cancellationToken, logger).ConfigureAwait(false); | ||
} | ||
|
||
string queryName = httpClient is PowerPlatformConnectorClient ppcc && ppcc.RequestUrlPrefix.Contains("/sharepointonline/") ? "/alltables" : "/tables"; |
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.
httpClient is PowerPlatformConnectorClient ppcc && ppcc.RequestUrlPrefix.Contains
The issue description in #2780 suggested dealing with this case by looking at HttpClient.BaseAddress - would that work? It would let us avoid the type cast.
nit- either way - can you encapsulate this in a tiny helper method IsSharepoint(httpClient)?
#Resolved
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.
It's not in the HttpClient base address unfortunately
I will encapsulate in IsSharepoint()
✅ No public API change. |
@@ -43,6 +43,8 @@ public class PowerPlatformConnectorClient : HttpClient | |||
|
|||
public string EnvironmentId { get; set; } | |||
|
|||
public string RequestUrlPrefix { get; } |
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.
can we remove (coming from httpClient now). Refers to: src/libraries/Microsoft.PowerFx.Connectors/Tabular/Services/CdpServiceBase.cs:21 in 7a35813. [](commit_id = 7a35813, deletion_comment = False) |
@@ -24,10 +24,21 @@ internal class CdpTableResolver : ICdpTableResolver | |||
|
|||
private readonly HttpClient _httpClient; | |||
|
|||
private readonly string _uriPrefix; | |||
[Obsolete] | |||
private readonly string _uriPrefix = null; |
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.
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.
I don't think so
This one is only used for backward compatibility
@@ -103,8 +122,7 @@ public async Task<ConnectorType> ResolveTableAsync(string tableName, Cancellatio | |||
return connectorType; | |||
} | |||
|
|||
internal static bool IsSql(string uriPrefix) => uriPrefix.Contains("/sql/"); | |||
|
|||
[Obsolete] | |||
internal static bool UseV2(string uriPrefix) => uriPrefix.Contains("/sql/") || | |||
uriPrefix.Contains("/zendesk/"); |
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.
Since this is ultimately used to determine the endpoint, can we remove from here and push higher?
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.
I'm not sure where you'd put it
This is used twice in this class, twice in CdpDataSource and once in CdpTable, always in [Obsolete] methods
If we want to absorb the breaking change fully we can jsut delete all these [Obsolete] things
Just let know if is you agree/want that?
This method is used in CdpDataSource to convert Http responses to POCOs In reply to: 2551745584 Refers to: src/libraries/Microsoft.PowerFx.Connectors/Tabular/Services/CdpServiceBase.cs:21 in 7a35813. [](commit_id = 7a35813, deletion_comment = False) |
No description provided.