aws-sdk-kotlin icon indicating copy to clipboard operation
aws-sdk-kotlin copied to clipboard

Generate diff preview uses wrong smithy-kotlin version

Open aajtodd opened this issue 2 years ago • 0 comments

Describe the bug

The codegen diff preview action has a bug in it where the wrong version of smithy-kotlin is used when switching branches. This was found in a recent PR here

Expected behavior

The upstream smithy-kotlin branch should be used only when generating the HEAD differences. For the base codegen preview it should use main (or the matching upstream base branch if it exists).

Current behavior

We use CRT builder to pull the correct smithy-kotlin version and then checkout a new branch based on the HEAD sha (immediately disregarding the work done by builder to set the correct versions).

gradle.properties is dirty, committing before generating diffs
[detached HEAD 6df67ae0] codegen diff autocommit
 1 file changed, 1 insertion(+), 1 deletion(-)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:

  6df67ae0 codegen diff autocommit

If you want to keep it by creating a new branch, this may be a good time
to do so with:

 git branch <new-branch-name> 6df67ae0

Switched to a new branch '__tmp-localonly-head'

The commit being left behind is the auto commit to gradle.properties with the correct upstream version determined by CRT builder.

Steps to Reproduce

N/A

Possible Solution

No response

Context

No response

AWS Kotlin SDK version used

N/A

Platform (JVM/JS/Native)

N/A

Operating System and version

N/A

aajtodd avatar Oct 21 '22 13:10 aajtodd