FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

semantic release docker image version (3.12) is not supported by my project · Issue #946 · python-semantic-release/python-semantic-release · GitHub

Repository navigation

semantic release docker image version (3.12) is not supported by my project #946

Description

The problem

I cannot make releases anymore as python-semantic-release gh action docker image uses python 3.12 and my project does now support it yet.

I'm getting an error coming from poetry and semantic release docker image python version (3.12).

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
The currently activated Python version 3.12.3 is not supported by the project (>=3.8, <3.11.0).
Trying to find and use a compatible version. 
Poetry was unable to find a compatible version. If you have one, you can explicitly use it via the "env use" command.
Usage: semantic-release version [OPTIONS]
Try 'semantic-release version -h' for help.
Error: Command '['bash', '-c', 'pip install poetry && poetry build']' returned non-zero exit status 1.

Expected behavior

Build and create commit + tag

Environment

Please state which OS you are using and provide the output of the following commands:

  • Ubuntu
  • Python 3.12
  • semantic-release, version 9.8.0
  • poetry

Configuration

I'm using poetry...

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = ">=3.8, <3.11.0"

With semantic release...

[tool.semantic_release]
version_variables = ["deployer/__init__.py:__version__"]
version_toml = ["pyproject.toml:tool.poetry.version"]
branch = "main"
build_command = "pip install poetry && poetry build"
commit_message = "chore(release): {version}\n\n[skip ci]\nAutomatically generated by semantic-release"
tag_format = "{version}"

In a github action...

name: CI and Release on main

on:
  push:
    branches:
      - main

jobs:
  ci:
    name: CI
    uses: ./.github/workflows/ci.yaml

  release:
    name: Release
    runs-on: ubuntu-latest
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
      cancel-in-progress: true
    needs: ci
    permissions:
      id-token: write
      contents: write
    environment:
      name: pypi
      url: https://pypi.org/p/vertex-deployer

    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
        token: ${{ secrets.RELEASE_ACCESS_TOKEN }}

    - name: Python Semantic Release
      id: python-semantic-release
      uses: python-semantic-release/python-semantic-release@master
      with:
        github_token: ${{ secrets.RELEASE_ACCESS_TOKEN }}

Activity

  1. added and removed
    bugSomething isn't working properly
    on Jun 4, 2024
  2. codejedi365 commented on Jun 4, 2024

    Contributor

    First thing, don't track the master branch in your GitHub action, always use a tag or a specific hash. I can push any possible breaking change (with or without creating a release) to master which can break your pipeline outside of your awareness.

    Easiest fix is to lock your action onto v9.6.0 which is prior to the Docker image update. But obviously this solution means you are loosing out on any PSR updates.

    To get updates but control your version of Python, don't use the GitHub action and just use a shell step to run semantic-release on the command line. The GitHub action as a container action is locked into a specific version and users cannot change it. I intend to keep it at the latest for all build tools.

    #741 the composite action will change a lot of this but it's a breaking change for v10.

    Last option, consider removing your top limit on Python version as Python is well governed to not introduce breaking changes on feature updates denoted in the semver version. It's highly unlikely that your code will break on a new minor version. I recommend locking the major version and indicating the bare minimum Python version. You can do this in one conditional statement using ~= 3.8 or in two with >= 3.8.0, <4

  3. julesbertrand commented on Jun 4, 2024

    Author

    Thank you for your quick answer !

    About the python version: I'm on it but some packages I'm using aren't compatible with python 3.12 -> This is why I'm not using a conditional statement such as >= 3.8.0, <4. It's not about python itself, but python libraries.

    I think I'm going to switch to use a shell step with semantic release until the composite action is released !

  4. codejedi365 commented on Jun 4, 2024

    Contributor

    I was referring to the PSR version in your GitHub action configuration, which points at our repository via the uses directive. You should use the version, not a branch reference is what I was referring to.

  5. github-actions commented on Jun 19, 2024

    This issue has not received a response in 14 days. If no response is received in 7 days, it will be closed. We look forward to hearing from you.

  6. github-actions commented on Jun 26, 2024

    This issue was closed because no response was received.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL