Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Pre-store the dependency versions to check the version conflicts #6

Open

Description

@liyanhui1228

As per discussion last week, we could pre-store the dependency versions for each of the packages in the list below,

PKG_LIST = [
'google-api-core',
'google-api-python-client',
'google-auth',
'google-cloud-bigquery',
'google-cloud-bigquery-datatransfer',
'google-cloud-bigtable',
'google-cloud-container',
'google-cloud-core',
'google-cloud-dataflow',
'google-cloud-datastore',
'google-cloud-dns',
'google-cloud-error-reporting',
'google-cloud-firestore',
'google-cloud-language',
'google-cloud-logging',
'google-cloud-monitoring',
'google-cloud-pubsub',
'google-cloud-resource-manager',
'google-cloud-runtimeconfig',
'google-cloud-spanner',
'google-cloud-speech',
'google-cloud-storage',
'google-cloud-trace',
'google-cloud-translate',
'google-cloud-videointelligence',
'google-cloud-vision',
'google-resumable-media',
'googleapis-common-protos',
'grpc-google-iam-v1',
'grpcio',
'opencensus',
'protobuf',
'tensorboard',
'tensorflow',
'google-cloud',
'gcloud',
'oauth2client',
]

To get the deps and versions, we can use from pip._internal import get_installed_distributions.

And each time we receive a request to check the dependency conflicts, we just query the versions for each of the packages in the request to see if there are any conflict.

Data model for storing the deps and versions as below,

PKG_NAME PKG_VERSION DEP_NAME DEP_VERSION
google-cloud-logging 1.6.0 grpcio 1.12.1
google-cloud-logging 1.6.0 google-cloud-core 0.28.1
... ... ...

We'll still need to run the pip checker to actually do pip install the dependencies periodically(daily) to update the versions we stored. All the released versions of the list of packages will need to be calculated and pre stored as an setup.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions