UnlyEd / github-action-await-vercel

GitHub Action - Awaits a Vercel deployment to be ready
https://github.com/marketplace/actions/await-for-vercel-deployment
MIT License
30 stars 9 forks source link

Vercel readyState: READY too soon #65

Open azamat-sharapov opened 1 year ago

azamat-sharapov commented 1 year ago

Discussed in https://github.com/UnlyEd/github-action-await-vercel/discussions/63

Originally posted by **azamat-sharapov** October 21, 2022 Hi. For some reason, plugin resolves almost immediately. I turned on debugging and found out that Vercel responds with readyState: READY, however the deployment was still in progress. I'm not sure what could be causing this and asking for help.
Workflow ```yaml # ... jobs: production-deployment: runs-on: ubuntu-latest steps: - uses: UnlyEd/github-action-await-vercel@v1.2.15 env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} with: deployment-url: company-url-here timeout: 300 # ... ```
Vercel response when debugging enabled ```json { "alias": [ "company-url-here", ], "aliasAssigned": true, "aliasError": null, "bootedAt": 1662716931099, "buildingAt": 1662716931995, "createdAt": 1662716931099, "creator": { "uid": "xK3EnMryM6wzb1qvbNna0oue", "username": "azamat-sharapov" }, "gitSource": { "ref": "production", "repoId": 264885110, "sha": "...", "type": "github", "prId": null }, "id": "...", "initReadyAt": 1662717060554, "lambdas": [ { "id": "...", "createdAt": 1662716931148, "entrypoint": null, "readyState": "READY", "readyStateAt": 1662716931148, "output": [] }, { "id": "...", "createdAt": 1662716935106, "entrypoint": ".", "output": [] } ], "name": "project-name-here", "meta": { "githubCommitAuthorName": "Azamat", "githubCommitMessage": "Production deployment version 85.0", "githubCommitOrg": "Company Name", "githubCommitRef": "production", "githubCommitRepo": "project-repo", "githubCommitSha": "...", "githubDeployment": "1", "githubOrg": "Company Name", "githubRepo": "project-name", "githubCommitRepoId": "...", "githubRepoId": "...", "githubCommitAuthorLogin": "azamat-sharapov" }, "public": false, "ready": 1662717060554, "readyState": "READY", "regions": [ "fra1" ], "source": "git", "status": "READY", "target": "production", "team": { "id": "...", "name": "Team Name", "slug": "team-name" }, "type": "LAMBDAS", "url": "random-url-by-vercel", "version": 2, "aliasAssignedAt": 1662717061128, "build": { "env": [ "CI", "VERCEL", "VERCEL_ENV", "TURBO_REMOTE_ONLY", "VERCEL_URL", "VERCEL_GIT_PROVIDER", "VERCEL_GIT_PREVIOUS_SHA", "VERCEL_GIT_REPO_SLUG", "VERCEL_GIT_REPO_OWNER", "VERCEL_GIT_REPO_ID", "VERCEL_GIT_COMMIT_REF", "VERCEL_GIT_COMMIT_SHA", "VERCEL_GIT_COMMIT_MESSAGE", "VERCEL_GIT_COMMIT_AUTHOR_LOGIN", "VERCEL_GIT_COMMIT_AUTHOR_NAME", "SENTRY_AUTH_TOKEN", "VUE_APP_SENTRY_DSN", "VUE_APP_SEGMENT_AUTH_TOKEN", "VERCEL_BUILD_OUTPUTS_EDGE_FUNCTION", "VERCEL_EDGE_FUNCTIONS_STRICT_MODE", "USE_OUTPUT_FOR_EDGE_FUNCTIONS", "NEXT_PRIVATE_MULTI_PAYLOAD", "ENABLE_ROOT_PATH_BUILD_CACHE" ] }, "builds": [], "createdIn": "sfo1", "env": [], "functions": null, "inspectorUrl": "...", "ownerId": "...", "plan": "pro", "projectId": "...", "projectSettings": { "buildCommand": "pnpm run vercel-build", "devCommand": null, "framework": "vue", "commandForIgnoringBuildStep": null, "installCommand": "pnpm install", "outputDirectory": null }, "routes": [ { "src": "^/[^/]*\\.(js|txt|ico|json)$", "headers": { "cache-control": "max-age=300" }, "continue": true }, { "src": "^/(img|js|css|fonts|media)/[^/]+\\.[0-9a-f]{8}\\.*$", "headers": { "cache-control": "max-age=31536000, immutable" }, "continue": true }, { "handle": "error" }, { "status": 404, "src": "^(?!/api).*$", "dest": "/404.html" }, { "handle": "filesystem" }, { "src": "^.*$", "dest": "/index.html" } ] } ```
Vadorequest commented 1 year ago

It could be an issue with Vercel, maybe? It seems odd that they would send back READY when it's not READY yet.

I haven't noticed a regression on this. I'm not sure what we can do about it. 🤔