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

Tables cleanup work #6181

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open

Tables cleanup work #6181

wants to merge 29 commits into from

Conversation

gearama
Copy link
Member

@gearama gearama commented Nov 5, 2024

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • C++ Guidelines
  • Doxygen docs
  • Unit tests
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-data-tables-cpp

@gearama
Copy link
Member Author

gearama commented Nov 6, 2024

/azp run cpp - tables

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gearama
Copy link
Member Author

gearama commented Nov 8, 2024

/azp run cpp - tables

Copy link

Azure Pipelines failed to run 1 pipeline(s).

@gearama
Copy link
Member Author

gearama commented Nov 8, 2024

/azp run cpp - tables - ci

Copy link

Azure Pipelines failed to run 1 pipeline(s).

Copy link
Member

@antkmsft antkmsft left a comment

Choose a reason for hiding this comment

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

I'd approve the PR, but since it is still a draft, I think more changes are expected so I'll wait until it is ready to review and review the remaining changes.

sdk/tables/azure-data-tables/src/table_clients.cpp Outdated Show resolved Hide resolved
sdk/tables/azure-data-tables/src/table_clients.cpp Outdated Show resolved Hide resolved
sdk/tables/azure-data-tables/src/table_clients.cpp Outdated Show resolved Hide resolved
@gearama
Copy link
Member Author

gearama commented Nov 8, 2024

/azp run cpp - tables

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gearama
Copy link
Member Author

gearama commented Nov 8, 2024

/azp run cpp - tables

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@gearama gearama marked this pull request as ready for review November 11, 2024 19:06
* @param context for canceling long running operations.
* @return Get access policy result.
*/
Response<Models::TableAccessPolicy> GetAccessPolicy(Core::Context const& context = {});
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing Get/Set AccessPolicy?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because credentials, they do not work with either token or SAS, connection string only, which we removed in this PR also. If we want these APIs to be there then we need those creds, which are not allowed anymore by SFI. so chicken <-> egg

auto tableServiceClient = Azure::Data::Tables::TableServiceClient(
"https://" + accountName + ".table.core.windows.net/", credential);
auto tableClient = Azure::Data::Tables::TableClient(
"https://" + accountName + ".table.core.windows.net/", TableName, credential);
Copy link
Member

Choose a reason for hiding this comment

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

Is the URL always going to be in the table.core.windows.net domain? Or is there a better way of figuring out the URL for the service?

For other services, they often take an instance URL as an environment variable rather than constructing the service URL - that way it works for sovereign clouds, etc.

int main()
{
auto tableServiceClient = TableServiceClient::CreateFromConnectionString(GetConnectionString());
auto tableClient = TableClient::CreateFromConnectionString(GetConnectionString(), TableName);
const std::string accountName{std::getenv("ACCOUNT_NAME")};
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't appear to be an "account" name, instead it appears to be a service instance name -to me, an "account" is associated with an entra ID and not an instance.

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

Successfully merging this pull request may close these issues.

6 participants