Skip to content

Runtime versioner gets confused when auditing a merge commit #3584

@jdisanti

Description

@jdisanti

The runtime-versioner audit command that gets run by pre-commit gets confused when auditing for a merge commit (for example, when merging main into a local feature branch).

For example, when merging main into one of my PR branches, running git merge --continue or git commit to complete the merge after resolving conflicts resulted in the following audit result:

     Running `/Users/jdisanti/src/smithy-rs/tools/target/debug/runtime-versioner audit`
2024-04-12T23:18:37.378299Z  WARN runtime_versioner::command::audit: there are newer releases since 'release-2024-04-02'
2024-04-12T23:18:43.916689Z  INFO runtime_versioner::command::audit: 'aws-config' changed and was version bumped from 1.1.10 to 1.2.1
2024-04-12T23:18:44.014764Z  INFO runtime_versioner::command::audit: 'aws-sigv4' changed and was version bumped from 1.2.0 to 1.2.1
2024-04-12T23:18:44.143456Z  INFO runtime_versioner::command::audit: 'aws-smithy-runtime' changed and was version bumped from 1.2.1 to 1.3.1
aws-credential-types was changed and version bumped, but the new version number (1.2.0) has already been published to crates.io. Choose a new version number.
aws-runtime was changed and version bumped, but the new version number (1.2.0) has already been published to crates.io. Choose a new version number.
aws-smithy-runtime-api was changed and version bumped, but the new version number (1.4.0) has already been published to crates.io. Choose a new version number.
aws-types was changed and version bumped, but the new version number (1.2.0) has already been published to crates.io. Choose a new version number.
Error: there are audit failures in the runtime crates

Looking at the diff, this audit result was clearly wrong. After completing the merge with git commit --no-verify, running runtime-versioner audit manually resulted in this correct audit:

❯ runtime-versioner audit
2024-04-12T23:20:45.723310Z  INFO runtime_versioner::command::audit: 'aws-config' changed and was version bumped from 1.2.0 to 1.2.1
2024-04-12T23:20:45.884663Z  INFO runtime_versioner::command::audit: 'aws-sigv4' changed and was version bumped from 1.2.0 to 1.2.1
2024-04-12T23:20:46.167308Z  INFO runtime_versioner::command::audit: 'aws-smithy-runtime' changed and was version bumped from 1.3.0 to 1.3.1
aws-smithy-runtime-api changed since release-2024-04-11 and requires a version bump
aws-types changed since release-2024-04-11 and requires a version bump
Error: there are audit failures in the runtime crates

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopsImproves our operations and release process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions