-
Notifications
You must be signed in to change notification settings - Fork 59
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
jf poetry install runs poetry update #835
Comments
Any feedback here? To be honest, I wonder the reason why When I run |
I am also impacted by this issue as well. My pyproject.toml already specifies my artifactory server in tool.poetry.source so my lock file already references artifactory as the source for my packages. This is a serious issue for applications that use version ranges in their pyproject.toml, but expect the versions specified in their lock files to be installed. By running "poetry update", the contents of any poetry.lock file are effectively ignored. This can causes dependencies to be installed at unexpected versions, since the poetry.lock file is used to track/lock down the specific versions which should be installed within the ranges specified with pyproject.toml. If jfrog wants to continue to inject the modification the tools.poetry.source as a default behavior, could we get some sort of option to disable this for project that already specify their artifactory server in the pyproject.toml and need their lock files to be respected? |
A build tool should not modify the code I intend to build from, unless I explicitly tell it to. The wrapping of poetry commands is completely useless due to this behavior. Can we get a reason for why jf cli modifies my code? |
I opened a support ticket with JFrog regarding the broken functionality in the A community plugin might be the way to go here. All build info should be possible to collect from the lock file and building+deploying packages should not be that hard to wrap.
|
I've made a PR that at least fixes the undesired version upgrades: #1235 |
Describe the bug
I am trying to use jf cli to install the python dependencies. When I run the
jf poetry install
, it runs internally poetry update, which is not intended since it is used in the Pipeline and I don't want my lock file to be updated.What I see is that there is always a call chain as follow
Run --> SetPypiRepoUrlWithCredentials --> ConfigPoetryRepo --> addRepoToPyprojectFile which runs a
poetry update
command everytime.Current behavior
👾 install:ci | jf poetry-config --repo-resolve $JFROG_PLATFORM_PYPI_REPO
16:32:19 [Debug] JFrog CLI version: 2.38.4
16:32:19 [Debug] OS/Arch: linux/amd64
16:32:19 [Info] poetry build config successfully created.
👾 install:ci | jf poetry install --sync
16:32:19 [Debug] JFrog CLI version: 2.38.4
16:32:19 [Debug] OS/Arch: linux/amd64
16:32:19 [Debug] Preparing to read the config file /builds/test/folder/solution-teams/the-awesome-team/folder-awscdk-python-app-poetry2/.jfrog/projects/poetry.yaml
16:32:19 [Debug] Found resolver in the config file /builds/test/folder/solution-teams/the-awesome-team/folder-awscdk-python-app-poetry2/.jfrog/projects/poetry.yaml
16:32:19 [Info] Running Poetry install.
16:32:19 [Debug] Preparing build prerequisites...
16:32:19 [Debug] Saving build general details at: /tmp/jfrog/builds/1339a8cb9483d833fdde458e1b4402202949ab77a6328d843980fd78485f1d55/partials
16:32:19 [Info] Running Poetry config repositories.jfrog-server https://url-of-the-artifactory/artifactory/api/pypi/tat-pypi/simple
16:32:19 [Debug] Usage Report: Sending info...
16:32:19 [Debug] Sending HTTP GET request to: https://url-of-the-artifactory/artifactory/api/system/version
16:32:19 [Debug] Artifactory response: 200
16:32:19 [Debug] JFrog Artifactory version is: 7.59.9
16:32:19 [Debug] Sending HTTP POST request to: https://url-of-the-artifactory/artifactory/api/system/usage
16:32:19 [Debug] Usage Report: Usage info sent successfully. Artifactory response: 200
16:32:19 [Info] Running Poetry config ***
Using a plaintext file to store credentials
16:32:20 [Info] Added tool.poetry.source name:"jfrog-server" url:"https://url-of-the-artifactory/artifactory/api/pypi/tat-pypi/simple"
16:32:20 [Info] Running Poetry update
Updating dependencies
Resolving dependencies...
Writing lock file
Package operations: 22 installs, 0 updates, 0 removals
• Installing attrs (23.1.0)
• Installing exceptiongroup (1.1.1)
• Installing six (1.16.0)
• Installing cattrs (22.2.0)
• Installing importlib-resources (5.12.0)
• Installing python-dateutil (2.8.2)
• Installing typeguard (2.13.3)
• Installing publication (0.0.3)
• Installing typing-extensions (4.6.3)
• Installing iniconfig (2.0.0)
• Installing jsii (1.83.0)
• Installing packaging (23.1)
• Installing pluggy (1.0.0)
• Installing tomli (2.0.1)
• Installing aws-cdk-asset-awscli-v1 (2.2.189)
• Installing aws-cdk-asset-kubectl-v20 (2.1.1)
• Installing aws-cdk-asset-node-proxy-agent-v5 (2.0.163)
• Installing constructs (10.2.52)
• Installing pytest (7.3.1)
• Installing coverage (7.2.7)
• Installing aws-cdk-lib (2.83.1)
• Installing pytest-cov (4.1.0)
/root/.cache/pypoetry/virtualenvs/folder-awscdk-python-app-poetry2-2HAYbF5F-py3.10
Installing dependencies from lock file
Finding the necessary packages for the current system
Package operations: 0 installs, 0 updates, 0 removals, 22 skipped
• Installing attrs (23.1.0): Skipped for the following reason: Already installed
• Installing aws-cdk-asset-awscli-v1 (2.2.189): Skipped for the following reason: Already installed
• Installing aws-cdk-asset-kubectl-v20 (2.1.1): Skipped for the following reason: Already installed
• Installing aws-cdk-asset-node-proxy-agent-v5 (2.0.163): Skipped for the following reason: Already installed
• Installing aws-cdk-lib (2.83.1): Skipped for the following reason: Already installed
• Installing cattrs (22.2.0): Skipped for the following reason: Already installed
• Installing constructs (10.2.52): Skipped for the following reason: Already installed
• Installing exceptiongroup (1.1.1): Skipped for the following reason: Already installed
• Installing coverage (7.2.7): Skipped for the following reason: Already installed
• Installing importlib-resources (5.12.0): Skipped for the following reason: Already installed
• Installing pytest (7.3.1): Skipped for the following reason: Already installed
• Installing pluggy (1.0.0): Skipped for the following reason: Already installed
• Installing iniconfig (2.0.0): Skipped for the following reason: Already installed
• Installing pytest-cov (4.1.0): Skipped for the following reason: Already installed
• Installing tomli (2.0.1): Skipped for the following reason: Already installed
• Installing packaging (23.1): Skipped for the following reason: Already installed
• Installing typing-extensions (4.6.3): Skipped for the following reason: Already installed
• Installing six (1.16.0): Skipped for the following reason: Already installed
• Installing publication (0.0.3): Skipped for the following reason: Already installed
• Installing python-dateutil (2.8.2): Skipped for the following reason: Already installed
• Installing typeguard (2.13.3): Skipped for the following reason: Already installed
• Installing jsii (1.83.0): Skipped for the following reason: Already installed
Installing the current project: folder-awscdk-python-app-poetry2 (0.0.0)
Reproduction steps
No response
Expected behavior
No response
JFrog CLI-Core version
2.34.7
JFrog CLI version (if applicable)
2.38.4
Operating system type and version
mac, linux
JFrog Artifactory version
7.59.9
JFrog Xray version
No response
The text was updated successfully, but these errors were encountered: