-
Notifications
You must be signed in to change notification settings - Fork 236
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
{Type error for argument version: expected type: integer, actual value: "1" (type string)}] after updating 0.1.23845 -> 0.1.25569 #895
Labels
bug
Something isn't working
Comments
For context / reproducing, I've created a job in my CI config release-twine-setup-py:
description: twine upload
docker:
- image: my-registry/python-3-10:v1.0.1
auth:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
resource_class: << parameters.resource-class >>
environment:
TWINE_NON_INTERACTIVE: true
parameters:
resource-class:
type: enum
enum:
- small
- medium
- large
- xlarge
- 2xlarge
default: small
description: Resource class to run as.
user:
description: PyPi username.
type: string
default: $TWINE_USERNAME
password:
description: PyPi API token.
type: string
default: $TWINE_PASSWORD
repository:
description: Repository name to upload to. Must have a URL set in .pypirc.
type: string
default: python
config:
description: Location of the .pypirc-file to use.
type: string
default: .pypirc
version:
description: Override the version of the uploaded artifact in pyproject.toml. Mainly for development pipelines.
type: integer
default: -1
steps:
- checkout
- install-poetry
- unless:
condition:
equal: [<< parameters.version >>, -1]
steps:
- run:
name: Update pyproject.toml version
command: |
_VERSION="$(grep -oiP "(?<=version = \").*(?=\")" pyproject.toml)"
if [[ "$_VERSION" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then
sed "s@version = \"${_VERSION}\"@version = \"0.0.<< parameters.version >>\"@" pyproject.toml > pyproject.toml.tmp
elif [[ "$_VERSION" =~ ^[0-9]+.[0-9]+.[0-9]+a[0-9]+$ ]]; then
_VERSION_A="${_VERSION%%a*}"
sed "s@version = \"${_VERSION}\"@version = \"0.0.<< parameters.version >>\"@" pyproject.toml > pyproject.toml.tmp
fi
mv pyproject.toml.tmp pyproject.toml
# - run:
# name: Update setup.py version
# command: |
# _VERSION="$(grep -oiP "(?<=version=\').*(?=\',)" setup.py)"
# if [[ "$_VERSION" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then
# sed "s@version=\'${_VERSION}\'@version=\'0.0.<< parameters.version >>\'@" setup.py > setup.py.tmp
# elif [[ "$_VERSION" =~ ^[0-9]+.[0-9]+.[0-9]+a[0-9]+$ ]]; then
# _VERSION_A="${_VERSION%%a*}"
# sed "s@version=\'${_VERSION}\'@version=\'0.0.<< parameters.version >>\'@" setup.py > setup.py.tmp
# fi
# mv setup.py.tmp setup.py
- run:
name: Build package
command: |
poetry build
- run:
name: Publish package to PyPI
command: |
pip install twine
twine upload dist/* -u << parameters.user >> -p << parameters.password >> --repository << parameters.repository >> --non-interactive --config-file << parameters.config >> and I call it in my workflow like - release-twine-setup-py:
name: twine upload [python-develop]
context: nexus
repository: python-develop
version: << pipeline.number >>
requires:
- pylint [python-develop]
filters:
branches:
ignore:
- master and from what I see in the docs (https://circleci.com/docs/pipeline-variables/), |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Meta:
CircleCI CLI Version:
0.1.25569
Operating System:
cimg/python:3.10.9
CircleCI CLI Diagnostic:
Current behavior:
Also here: https://app.circleci.com/pipelines/github/premiscale/premiscale/511/workflows/083fe6b8-0039-46bb-bb70-caeb8edcf371/jobs/2592?invite=true#step-107-5
Expected behavior:
Should be the same as the previous version, I think? So
$ circleci config validate .circleci/premiscale.yml You are running 0.1.23845 A new release is available (0.1.25569) You can update with `circleci update install` Validating config with following values git.base_revision: 960800bf119849aac88dcecb33ec6f9f2f3384ec id: 00000000-0000-0000-0000-000000000001 number: 1 project.git_url: https://github.com/premiscale/premiscale project.type: github git.tag: git.branch: ENG-148 git.revision: 960800bf119849aac88dcecb33ec6f9f2f3384ecConfig file at .circleci/premiscale.yml is valid.
When did this begin / Was this previously working?:
It worked on version
0.1.23845
, now it's broken on version0.1.25569
following runningcircleci update install
.Additional Information: N/A
The text was updated successfully, but these errors were encountered: