-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
atlantis testdrive failed with 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}] #3092
Comments
I recall having issues with it recently as well. This could also be related to this issue
@tekumara did you have to do anything special to get testdrive to work in #2329? If so, please tell us and we can document it. Does it work for you using the latest version? |
This is what I did to get it working. |
Hmm. I'll have to give this a shot again. I recall also hitting an issue when running testdrive. Thank you for adding that @tekumara |
I've just downloaded the latest release and am getting the same 422 Validation Failed error, even after deleting the existing atlantis fork - it still occurs |
Getting into the same problem with the latest tag |
I used an older release and ran testdrive successfully. This release can work: https://github.com/runatlantis/atlantis/releases/download/v0.19.8/atlantis_linux_amd64.zip |
you also need to downgrade to ngrok 2.x if running ngrok v3.x, i had 3.2.1 installed and ngrok didnt like the config file created by atlantis. you can manually upgrade the ngrok config in /tmp to verify this. downgrade to ngrok v2.3.41 worked around this issue. this
needs to be this for use with ngrok v3
|
Thanks for the hint. On macOS it worked with this one: https://github.com/runatlantis/atlantis/releases/download/v0.19.9/atlantis_darwin_arm64.zip |
So 0.19.9 is from October 2022 Here are all the changes in the testdrive module Most of the changes seem to be package upgrades The pr issue seems to be related to here atlantis/testdrive/testdrive.go Lines 255 to 260 in 3212fe9
Lines 73 to 98 in 3212fe9
Upstream example Maybe the base should be Perhaps the fork doesnt have a atlantis/testdrive/testdrive.go Lines 39 to 40 in 3212fe9
atlantis/testdrive/testdrive.go Lines 117 to 121 in 3212fe9
Yep looks like the example is still set to https://github.com/runatlantis/atlantis-example @lkysow could you add a We could also update testdrive to always retrieve the base branch of the fork prior to creating the pull request. The ngrok version is interesting Line 39 in 3212fe9
atlantis/testdrive/testdrive.go Lines 154 to 157 in 3212fe9
Latest stable is https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-v3-stable-linux-amd64.tgz from ngrok website. The new url contains a Here is the current ngrok config that's v1/v2 compatible and breaking for v3 atlantis/testdrive/testdrive.go Lines 175 to 183 in 3212fe9
Seems like the config could be run through an upgrade command
Or use the config posted above by @mdmelo -version: 1
+version: "2"
+region: us
web_addr: %s
tunnels:
atlantis:
addr: %d
- bind_tls: true
+ schemes:
+ - https
proto: http |
I asked @lkysow to update the atlantis-example and get did (thanks Luke) repo with a https://github.com/runatlantis/atlantis-example/tree/main |
Is this still an issue or can it be closed? |
It works well with v0.23.5. So I think you can close this issue. |
BTW, if you re-try => creating a new pull request
⠙Error: creating new pull request for repo pomcho555/atlantis-example: POST https://api.github.com/repos/pomcho555/atlantis-example/pulls: 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}] To solve this, you need to remove the existing repo. |
You can delete your fork or just create the main branch there and it should work, no? |
I suppose to avoid this error we should also avoid hard coding the target branch name here. I don't see the CreatePullRequest in the current golang github sdk. I do see this similar Create function which doesn't specify the branch name which we could use instead. We should also bump the sdk for testdrive to match the v52 in atlantis server |
Community Note
Overview of the Issue
I tried atlantis testdriv with following the instruction. But I couldn't let atlantis create a PR, even though I give a personal GitHub token full access.
Reproduction Steps
Logs
Logs
Environment details
Version: atlantis 0.22.3
OS: macOS Ventura 13.0.1 (22A400)
Additional Context
The text was updated successfully, but these errors were encountered: