Skip to content

Nox session release:prepare fails in multi-project-repo #580

@ckunki

Description

@ckunki

Checklist

In order to improve the time, how long a bugfix does take, please make sure you address as much as possible of the following checklist.

  • I have reproduced the issue with PTB 1.10.0
  • I have added references to issues that sound similar in section Related Issues.

Tip: Adding screenshots, outputs and logs might help to improve clarity.

Summary

poetry run -- nox -s release-prepare -- --no-pr --no-branch --type minor
failed for

Traceback (most recent call last):

  File "nox/sessions.py", line 1119, in execute
    self.func(session)
  File "nox/_decorators.py", line 99, in __call__
    return self.func(*args, **kwargs)
  File "exasol/toolbox/nox/_release.py", line 135, in prepare_release
    changelogs.update_changelogs_for_release()
  File "exasol/toolbox/util/release/changelog.py", line 142, in update_changelogs_for_release
    self._create_versioned_changelog(unreleased_content)
  File "exasol/toolbox/util/release/changelog.py", line 50, in _create_versioned_changelog
    if dependency_changes := self._describe_dependency_changes():
  File "exasol/toolbox/util/release/changelog.py", line 71, in _describe_dependency_changes
    previous_dependencies_in_groups = get_dependencies_from_latest_tag()
  File "exasol/toolbox/util/dependencies/poetry_dependencies.py", 
         line 175, in get_dependencies_from_latest_tag
    Git.copy_remote_file_locally(latest_tag, "poetry.lock", tmpdir)
  File "exasol/toolbox/util/git.py", line 44, in copy_remote_file_locally
    contents = Git.read_file_from_tag(tag=tag, remote_file=remote_file)
  File "exasol/toolbox/util/git.py", line 10, in wrapper
    output = subprocess.run(
  File "/usr/lib64/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,

subprocess.CalledProcessError: Command '['git', 'cat-file', 'blob',
'pytest-backend-1.2.1:poetry.lock']' returned non-zero exit status 128.

Root Cause (optional)

Git tag pytest-backend-1.2.1 exists and is the latest tag, but each subproject in this repo contains a separate individual file poetry.lock, hence the path is incorrect, but should be pytest-extension/poetry.lock in this case.

See function get_dependencies_from_latest_tag() in file exasol/toolbox/util/dependencies/poetry_dependencies.py.

Metadata

Metadata

Assignees

Labels

bugUnwanted / harmful behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions