laminas/automatic-releases

Expected "200", got "int".

Closed this issue · 4 comments

Bug Report

Q A
Version(s) 1.19.0

Summary

The Github Action crashes with the following messages:

Run laminas/automatic-releases@v1
  with:
    command-name: laminas:automatic-releases:create-merge-up-pull-request
  env:
    GITHUB_TOKEN: ***
    SIGNING_SECRET_KEY: ***
  
    GIT_AUTHOR_NAME: ***
    GIT_AUTHOR_EMAIL: ***
/usr/bin/docker run --name ghcriolaminasautomaticreleases1_7eaafe --label [2](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:2)90506 --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_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_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_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -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 "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -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/webauthn-framework/webauthn-framework":"/github/workspace" ghcr.io/laminas/automatic-releases:1  "laminas:automatic-releases:create-merge-up-pull-request"

In AssertException.php line [3](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:3)2:
                                        
  [Psl\Type\Exception\AssertException]  
  Expected "200", got "int".            
                                        

Exception trace:
  at /app/vendor/azjezz/psl/src/Psl/Type/Exception/AssertException.php:32
 Psl\Type\Exception\AssertException::withValue() at /app/vendor/azjezz/psl/src/Psl/Type/Internal/LiteralScalarType.php:109
 Psl\Type\Internal\LiteralScalarType->assert() at /app/src/Github/Api/GraphQL/RunGraphQLQuery.php:[5](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:5)1
 Laminas\AutomaticReleases\Github\Api\GraphQL\RunGraphQLQuery->__invoke() at /app/src/Github/Api/GraphQL/Query/GetMilestoneFirst100IssuesAndPullRequests.php:82
 Laminas\AutomaticReleases\Github\Api\GraphQL\Query\GetMilestoneFirst100IssuesAndPullRequests->__invoke() at /app/src/Application/Command/CreateMergeUpPullRequest.php:[7](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:7)9
 Laminas\AutomaticReleases\Application\Command\CreateMergeUpPullRequest->execute() at /app/vendor/symfony/console/Command/Command.php:30[8](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:8)
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:1002
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:2[9](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:9)9
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:[17](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:18)1
 Symfony\Component\Console\Application->run() at /app/bin/console.php:179
 Laminas\AutomaticReleases\WebApplication\{closure}() at /app/bin/console.php:[18](https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721#step:5:19)0

laminas:automatic-releases:create-merge-up-pull-request

Current behavior

See https://github.com/web-auth/webauthn-framework/actions/runs/3546107719/jobs/5954821721

How to reproduce

Hard to say how to reproduce. It used to work fine in the past.
The configuration file is the same as showed in the documentation (https://github.com/web-auth/webauthn-framework/blob/4.4.x/.github/workflows/release-on-milestone-closed.yml)

Expected behavior

Previous behaviour with the same version: https://github.com/web-auth/webauthn-framework/actions/runs/3436498063

Are you sure this is not a hiccup in the API?

Try turning on logging via the LOG_LEVEL environment variable (see #39 - I just realized it's not documented 😱)

It looks like it is now working fine.
I suspect this was due to an expired token on Github, but I cannot confirm.
I close for now as it works as expected. I will investigate on the token lifecycle in case it occurs again.

Regards.

Note: error reporting around this also improved as per #221, so please do report with the new error, if it occurs.

I get the Expected "200", got "int" error today:

I wouldn't say the error has improved.

As for the background, I know GitHub deleted all my tokens, so the secret used is no longer valid.

Run laminas/automatic-releases@v1


In AssertException.php line 32:
                                        
  [Psl\Type\Exception\AssertException]  
  Expected "200", got "int".            
                                        

Exception trace:
  at /app/vendor/azjezz/psl/src/Psl/Type/Exception/AssertException.php:32
 Psl\Type\Exception\AssertException::withValue() at /app/vendor/azjezz/psl/src/Psl/Type/Internal/LiteralScalarType.php:109
 Psl\Type\Internal\LiteralScalarType->assert() at /app/src/Github/Api/GraphQL/RunGraphQLQuery.php:51
 Laminas\AutomaticReleases\Github\Api\GraphQL\RunGraphQLQuery->__invoke() at /app/src/Github/Api/GraphQL/Query/GetMilestoneFirst100IssuesAndPullRequests.php:77
 Laminas\AutomaticReleases\Github\Api\GraphQL\Query\GetMilestoneFirst100IssuesAndPullRequests->__invoke() at /app/src/Application/Command/ReleaseCommand.php:57
 Laminas\AutomaticReleases\Application\Command\ReleaseCommand->execute() at /app/vendor/symfony/console/Command/Command.php:312
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:1022
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:314
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:168
 Symfony\Component\Console\Application->run() at /app/bin/console.php:179
 Laminas\AutomaticReleases\WebApplication\{closure}() at /app/bin/console.php:180

laminas:automatic-releases:release