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

[Cosmos] disable api version check for new pylint requirements #24008

Merged
merged 87 commits into from
Apr 26, 2022
Merged

[Cosmos] disable api version check for new pylint requirements #24008

merged 87 commits into from
Apr 26, 2022

Conversation

simorenoh
Copy link
Member

From https://azure.github.io/azure-sdk/python_design.html#python-client-constructor-api-version-argument-1

These guidelines will now begin to be enforced starting 04/15, so making this PR pre-emptively to unblock Cosmos once this check goes out (since it will block our pylint check in the pipelines). Can't merge this until those changes are out but wanted to get ahead of it.

simorenoh and others added 30 commits August 13, 2021 13:14
* Removed some stuff

* Looking at constructors

* Updated request

* Added client close

* working client creation

Co-authored-by: simorenoh <[email protected]>
database read works, but ignored exception is returned:
Fatal error on SSL transport
NoneType has no attribute 'send' (_loop._proactor.send)
RuntimeError: Event loop is closed
Unclosed connector/ connection
Added methods needed to use async with when initializing client, but logs output "Exception ignored... Runtime Error: Event loop is closed"
missing upsert and other resources
missing read_all_items and both query methods for container class
Complete item CRUD functionality - only missing queries
Query functionality and container query methods
also fixed README and added examples_async
@azure-sdk
Copy link
Collaborator

azure-sdk commented Apr 14, 2022

API change check for azure-cosmos

API changes have been detected in azure-cosmos. You can review API changes here

API changes

-     cvar CurrentVersion = 2018-12-31
-     cvar QueryVersion = 1.0
-     cvar SDKName = azure-cosmos
+     cvar SDK_name = azure-cosmos
+     cvar api_versions = ['2018-06-18', '2018-08-31', '2018-09-17', '2018-12-31', '2019-10-14', '2020-07-15', '2020-11-05']
+     cvar current_version = 2018-12-31
+     cvar query_version = 1.0

@simorenoh simorenoh requested a review from tjprescott April 18, 2022 14:18
@simorenoh
Copy link
Member Author

/azp run python - cosmos - ci

@azure-pipelines
Copy link

Pull request contains merge conflicts.

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run python - [service] - ci

@simorenoh
Copy link
Member Author

/azp run python - cosmos - ci

@simorenoh simorenoh requested a review from johanste April 19, 2022 23:17
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

This concept does not applies to Cosmos DB at all. Our SDK has more functionality than just serving as a wrapper for the REST calls - we don't support older API versions in our later SDKs.

Also when we introduce direct mode for the SDK these changes would even become useless for instance as at that point there is no REST API call.

This is not something that we do in any of our other SDKs.. (Java, .Net, NodeJS, GO SDK)

still would like to have the newer versions to track the changes that have been made/ changes the SDK might need to do in the future with api versions
Copy link
Member

@johanste johanste left a comment

Choose a reason for hiding this comment

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

Let's make sure we are not doing breaking changes to make the linter happy. If this is a change to something that hasn't already been released, then it is goodness...

sdk/cosmos/azure-cosmos/azure/cosmos/http_constants.py Outdated Show resolved Hide resolved
@simorenoh simorenoh dismissed stale reviews from johanste and kushagraThapar April 26, 2022 20:08

changes made

Copy link
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

Tracking issue for this topic here: #24094

@tjprescott tjprescott merged commit 380dd6c into Azure:main Apr 26, 2022
@simorenoh simorenoh deleted the cosmos-disable-api-version-check branch May 11, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos Do Not Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants