-
Notifications
You must be signed in to change notification settings - Fork 464
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
Branch name validation too strict #247
Comments
I have the same thing today for one of our branches |
In our case we had such error: |
After we changed the branch name it went through without any problems. |
@simonmumenthaler Thank you for reporting this issue with us. I tried reproducing this issue on my end and couldn't see the error that you are getting with the same branch name as yours i.e. |
@paragbhingre Thank you for investigating this problem. I receive the error in different repos. The action works when running on master but fails on our The config I use for the action:
|
I hit this, I tried overriding
Rather than disabling session tagging altogether, I made #259 to apply the same sanitation to the branch name that the workflow name gets. |
@dgholz Thank you for your contribution, I was just wondering if changing the name of the branch have any side effects on the workflow? As in if we modify the name of the branch then does it affect/break the workflow at any point as real name of the branch is different than the one we are providing after modifying it? |
I think changing the branch name is safe. The modified branch name is only used on the session tag, and that's just a 'nice to know' bit of information when looking at them in the console/API. |
I mentioned this in the PR but I'm having trouble reproducing this issue when running from branches containing the |
You're having trouble reproducing because you're using the OIDC token instead of explicit secret access key/access key ID, and the code specifically throws away the session tags when the OIDC token is used configure-aws-credentials/index.js Line 92 in 5820660
|
Thanks for getting back @dgholz, I did use access keys! You can see from my comment in the PR that I was testing using access keys because of this OIDC functionality. I can try to test again later this week, is there anything else you think i could have misconfigured based on my workflow file? |
I see you passed the access keys, but because of
they are ignored, and the OIDC token is used instead. Take that out and you will reproduce it. I know it seem impossible from reading the code, since the GitHub OIDC token should only be used if the access key is not set. But that's the only difference I can see between your workflow and my reproduction https://github.com/dgholz/aws-credentials-repro/actions/runs/3282098461/jobs/5405027659#step:2:12 |
Thanks for the suggestion, I tried it out and still couldn't get it to fail - Specifying permissions doesn't necessarily mean the action will try to use OIDC. If an access key is provided, that signals to the action to use access keys as authentication configure-aws-credentials/index.js Line 295 in a12c502
However, I finally figured out what I was doing wrong. I was trying to use a pull request from the branch to test it, and it turns out that a PR is considered its own branch, at least for this. TIL. I checked CloudTrail and saw this for the session tag:
So, my bad for hesitating this long due to my own error 😅. Are you willing to reopen the PR for this or make a new one @dgholz? I'm not able to reopen it 🙂 |
Most certainly. I think I did something dumb and force-pushed the branch (after rebasing), which stopped it from being re-openable. I've reset the branch, so I think you can re-open it now. |
I have just experienced this when trying to call |
I have also experienced this issue with a git branch name of |
This should be fixed in |
** Note ** |
We name our branches with a specific pattern that starts with a
#
followed by digits and other chars like#2-bit-ref-r
.But when executing the
configure-aws-credentials
action it fails since the name does not match the required regex pattern.1 validation error detected: Value 'refs/heads/#2-bit-ref-r' at 'tags.7.member.value' failed to satisfy constraint: Member must satisfy regular expression pattern: [\p{L}\p{Z}\p{N}_.:/=+\-@]*
Since for github it's a valid branch name it should also be accepted by this action.
The text was updated successfully, but these errors were encountered: