-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Breadth Coverage] Datashare #1476
Conversation
If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:
|
Datashare |
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def example_name_or_id_validator(cmd, namespace): |
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.
Unused code.
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.
saw this in another PR, pls feedback to codegen team to remove it
I notice there are "generated" and "manual" folders. Can you explain them? |
src/datashare/README.md
Outdated
--resource-group "datashare_provider_rg" \ | ||
--share-name "cli_test_share" | ||
|
||
#### Datashare Resource Management for a Consumer: |
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.
todo?
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def example_name_or_id_validator(cmd, namespace): |
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.
saw this in another PR, pls feedback to codegen team to remove it
Do not review generated code, they have issues and will be fixed only with regeneration. I copied all generated code into manual folder and modified it there. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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've reviewed generated code. The manual code looks good comparing to generated one. pls help to make sure comments in generated code covered in manual code. thanks.
\\"tableName\\":\\"Table1\\"}}" | ||
- name: Create a SqlDWTable dataset | ||
text: |- | ||
az datashare dataset create --account-name MyAccount --name "Dataset1" --resource-group MyResourceGroup --share-name "Share1" \ |
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.
nice examples
g.custom_command('create', 'datashare_data_set_create') | ||
g.custom_command('delete', 'datashare_data_set_delete', supports_no_wait=True, confirmation=True) |
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.
Curious about why "create" does not support no wait. Does it indicate "create" is faster than "delete"?
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 guess delete involves updating for all consumers who received the dataset and may have created dataset-mapping, trigger related to it.
return {self.parameter_name: name} | ||
|
||
def remove_resource(self, name, **kwargs): | ||
pass |
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.
Do we need to remove resource?
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.
This file is not used and removed it.
…ions into datashare
c.argument('resource_group_name', resource_group_name_type) # modified | ||
|
||
with self.argument_context('datashare account show') as c: | ||
c.argument('resource_group_name', resource_group_name_type) # modified |
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.
Why do we need to add resource_group_name
? The default definition is not enough ? And what does #modified
in the last part means ?
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.
This is autogenerated. I think either keeping it or removing it is fine. #modified is to mark the code that was modified for autogenerated code since I copied all generated code here. The initial thought was to generate multiple times and we will have less manual code. We can eventually only keep modified code in manual folder. But that's not so convenient for datashare with a large amount of code. I finally decided to remove the generated code that needs to be modified.
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update
src/index.json
automatically.The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify
src/index.json
.