Skip to content
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

Release fails due to azjezz/psl coercion error #161

Open
boesing opened this issue Aug 8, 2021 · 0 comments
Open

Release fails due to azjezz/psl coercion error #161

boesing opened this issue Aug 8, 2021 · 0 comments
Labels
Bug Something isn't working

Comments

@boesing
Copy link
Member

boesing commented Aug 8, 2021

Bug Report

Q A
Version(s) 1.12.2

Summary

I've encountered an issue when releasing for the first time. In another project, that worked as of yesterday but today its broken in another project...

Current behavior

/usr/bin/docker run --name ghcriolaminasautomaticreleases1_742f3c --label 3bec5f --workdir /github/workspace --rm -e GITHUB_TOKEN -e SIGNING_SECRET_KEY -e GIT_AUTHOR_NAME -e GIT_AUTHOR_EMAIL -e INPUT_COMMAND-NAME -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/laminas-cache-storage-adapter-benchmark/laminas-cache-storage-adapter-benchmark":"/github/workspace" ghcr.io/laminas/automatic-releases:1  "laminas:automatic-releases:release"
[2021-08-08T11:38:30.784862+00:00] automatic-releases.INFO: CommitReleaseChangelog: no changes to commit. [] []

In typed.php line 25:
                                                                           
  [Psl\Json\Exception\DecodeException]                                     
  Could not coerce "array" to type "array{'html_url': non-empty-string}".  
                                                                           

Exception trace:
  at /app/vendor/azjezz/psl/src/Psl/Json/typed.php:25
 Psl\Json\typed() at /app/src/Github/Api/V3/CreateReleaseThroughApiCall.php:70
 Laminas\AutomaticReleases\Github\Api\V3\CreateReleaseThroughApiCall->__invoke() at /app/src/Application/Command/ReleaseCommand.php:112
 Laminas\AutomaticReleases\Application\Command\ReleaseCommand->execute() at /app/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:971
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:290
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:166
 Symfony\Component\Console\Application->run() at /app/bin/console.php:171
 Laminas\AutomaticReleases\WebApplication\{closure}() at /app/bin/console.php:172

In CoercionException.php line 34:
                                                                           
  [Psl\Type\Exception\CoercionException]                                   
  Could not coerce "array" to type "array{'html_url': non-empty-string}".  
                                                                           

Exception trace:
  at /app/vendor/azjezz/psl/src/Psl/Type/Exception/CoercionException.php:34
 Psl\Type\Exception\CoercionException::withValue() at /app/vendor/azjezz/psl/src/Psl/Type/Internal/ShapeType.php:63
 Psl\Type\Internal\ShapeType->coerce() at /app/vendor/azjezz/psl/src/Psl/Json/typed.php:23
 Psl\Json\typed() at /app/src/Github/Api/V3/CreateReleaseThroughApiCall.php:70
 Laminas\AutomaticReleases\Github\Api\V3\CreateReleaseThroughApiCall->__invoke() at /app/src/Application/Command/ReleaseCommand.php:112
 Laminas\AutomaticReleases\Application\Command\ReleaseCommand->execute() at /app/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:971
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:290
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:166
 Symfony\Component\Console\Application->run() at /app/bin/console.php:171
 Laminas\AutomaticReleases\WebApplication\{closure}() at /app/bin/console.php:172

laminas:automatic-releases:release

https://github.com/laminas/laminas-cache-storage-adapter-benchmark/runs/3273400689?check_suite_focus=true

After this issue occured, re-opening a milestone and closing it again to trigger another release will lead to:

/usr/bin/docker run --name ghcriolaminasautomaticreleases1_cd45f4 --label 3bec5f --workdir /github/workspace --rm -e GITHUB_TOKEN -e SIGNING_SECRET_KEY -e GIT_AUTHOR_NAME -e GIT_AUTHOR_EMAIL -e INPUT_COMMAND-NAME -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/laminas-cache-storage-adapter-benchmark/laminas-cache-storage-adapter-benchmark":"/github/workspace" ghcr.io/laminas/automatic-releases:1  "laminas:automatic-releases:release"
[2021-08-08T11:40:27.039270+00:00] automatic-releases.INFO: CommitReleaseChangelog: no changes to commit. [] []

In execute.php line 82:
                                                                               
  [Psl\Shell\Exception\FailedExecutionException (128)]                         
  Shell command "git 'tag' '1.0.0' '-F' '/tmp/created_tagc1lpumEb' '--cleanup  
  =whitespace' '--local-user=10B7743EC1CCD759'" returned an exit code of "128  
  ".                                                                           
                                                                               

Exception trace:
  at /app/vendor/azjezz/psl/src/Psl/Shell/execute.php:82
 Psl\Shell\execute() at /app/src/Git/CreateTagViaConsole.php:27
 Laminas\AutomaticReleases\Git\CreateTagViaConsole->__invoke() at /app/src/Application/Command/ReleaseCommand.php:108
 Laminas\AutomaticReleases\Application\Command\ReleaseCommand->execute() at /app/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:971
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:290
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:166
 Symfony\Component\Console\Application->run() at /app/bin/console.php:171
 Laminas\AutomaticReleases\WebApplication\{closure}() at /app/bin/console.php:172

laminas:automatic-releases:release

https://github.com/laminas/laminas-cache-storage-adapter-benchmark/runs/3273405991?check_suite_focus=true

The second error occurs due to the fact that the tag creation worked - just the release artifact creation didn't worked.

How to reproduce

TBH, I don't really know. The actual response of the github API is not passed to the error so I don't really know whats going on.

'html_url' => Type\non_empty_string(),

Expected behavior

Release works as expected and if an error occurs, re-opening and re-closing a milestone should not run into the same error over and over again due to the fact that the tag already exists.

@boesing boesing added the Bug Something isn't working label Aug 8, 2021
@boesing boesing changed the title Release fails due to azjezz/psl coercion error Release fails due to azjezz/psl coercion error Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant