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

Getting deployment_perms_error when trying to run this action since June 16 #188

Closed
idanarye opened this issue Jun 18, 2023 · 17 comments
Closed
Assignees

Comments

@idanarye
Copy link

Two days ago (June 16) this action stopped working. This is the first run where I've seen it fail - https://github.com/idanarye/bevy-yoleck/actions/runs/5293695779/jobs/9592352399.

When I look at the logs, I see these lines repeating 5 times after the Created deployment for <...>, ID: <...> log:

Getting Pages deployment status...
Current status: deployment_in_progress

And then these lines repeating over a hundred times:

Getting Pages deployment status...
Current status: deployment_perms_error

Followed by:

Error: Timeout reached, aborting!
Error: Timeout reached, aborting!
Canceling Pages deployment...
Canceled deployment with ID <...>

Note that:

  • I've upgraded from v1 to actions/deploy-pages@v2, but the problem still repeats.
  • When I tried to rerun older runs that did pass, this action failed.

So I think maybe something was changed in GitHub that either broke this action or caused it to require some additional configuration/permissions.

Note that six hours before that first failed run linked above I had a run that managed to pass and deploy the pages: https://github.com/idanarye/bevy-yoleck/actions/runs/5285227962/jobs/9563650017. So whatever changed probably happened during these six hours.

@onbjerg
Copy link

onbjerg commented Jun 19, 2023

We get this too, opened up a PR to bump to v2 but sad that this seems like it would not fix it. Did you by chance find a workaround?

@idanarye
Copy link
Author

@onbjerg I could not. The error is about permissions, so I tried adding more permissions that maybe could have been related (specifically I tried deployments: write and actions: write. They probably don't matter, but I was just trying things out) but it didn't work.

@onbjerg
Copy link

onbjerg commented Jun 19, 2023

Hitting the endpoint manually using gh seems to yield a response of e.g.

{
  "status": ""
}

which is a bit odd. The deployments do show up under the "Environments" tab of the repository as well, all marked as failed, even though you can explore the deployments and they seem to look fine 🤷🏻‍♂️

I did this to test:

gh api /repos/<owner>/<repo>/deployments
# use the latest deployment id
gh api /repos/<owner>/<repo>/pages/deployments/<id>

This seems to follow what the action itself does

@idanarye
Copy link
Author

The deployments do show up under the "Environments" tab of the repository as well, all marked as failed, even though you can explore the deployments and they seem to look fine

I've just checked in my repo, and the deployment does not update - I'm still getting the ones from the last successful deploy from before June 16. But the "Last deployed" in the "GitHub Pages" setting does update.

@ViliamVadocz
Copy link

I am encountering the same issue: failing job.
My workflow file is a bit simpler that @idanarye's. Maybe this will help with reproducibility.

@xxchan
Copy link

xxchan commented Jun 19, 2023

Same here. Begin to fail from 2 days ago
https://github.com/risingwavelabs/risingwave/actions/workflows/doc.yml

image

also

          I am hitting this error in my recent rustdoc deployments: https://github.com/DCNick3/shin/actions/runs/5300334374/jobs/9593874612

Is there anywhere I can find details about the "incorrect file permissions"?

Originally posted by @DCNick3 in #187 (comment)

@xxchan
Copy link

xxchan commented Jun 19, 2023

cc @tsusdere

@YiMysty
Copy link
Collaborator

YiMysty commented Jun 19, 2023

👋 there is a README updated today.
https://github.com/actions/upload-pages-artifact#file-permissions

You can use the similar command to troubleshooting the incorrect file permissions :)

@yoannchaudet
Copy link
Collaborator

yoannchaudet commented Jun 19, 2023

Apologies for not getting the documentation published on time.

If you get a permissions issue, that means your artifacts are not in the form we expect. You can fix that with an extra step, see https://github.com/actions/upload-pages-artifact#file-permissions (as per @YiMysty above 🙇).

We used to proactively fix permissions on your behalf but for many sites (with lots of files), that would delay Pages deployments by a lot and not be needed. We decided to just surface the error slightly better and document a mitigation step. Also note that this typically only happens if you have a custom workflow (dockers builds can be impacted).

@onbjerg
Copy link

onbjerg commented Jun 19, 2023

Hopefully that was just it, although I feel like this should have been a breaking version bump on @actions/upload-pages-artifact? 😄

@onbjerg
Copy link

onbjerg commented Jun 19, 2023

It worked!

Just a note here from me, turns out that the only file with incorrect permissions for my Rust based project was the .lock file that Cargo had snuck in to my rustdoc build 😄

@idanarye
Copy link
Author

That did the trick.

rgrandl added a commit to ServiceWeaver/weaver that referenced this issue Jun 21, 2023
The website deployment action has been failing lately. Looking at the issue, it seems to be related to actions/deploy-pages#188 that is due to https://github.com/actions/upload-pages-artifact#file-permissions.
rgrandl added a commit to ServiceWeaver/weaver that referenced this issue Jun 21, 2023
The website deployment action has been failing lately. Looking at the issue, it seems to be related to actions/deploy-pages#188 that is due to https://github.com/actions/upload-pages-artifact#file-permissions.
Indy2222 added a commit to DigitalExtinction/Game that referenced this issue Jun 21, 2023
SilverRainZ added a commit to sphinx-notes/pages that referenced this issue Jun 22, 2023
noritada added a commit to noritada/rrr-rs that referenced this issue Jun 26, 2023
See actions/deploy-pages#188 (comment)
for more details.

This will avoid timeouts like this:

    Getting Pages deployment status...
    Current status: deployment_perms_error
    Getting Pages deployment status...
    Current status: deployment_perms_error
    Error: Timeout reached, aborting!
    Error: Timeout reached, aborting!
noritada added a commit to noritada/rrr-rs that referenced this issue Jun 26, 2023
See actions/deploy-pages#188 (comment)
for more details.

This will avoid timeouts like this:

    Getting Pages deployment status...
    Current status: deployment_perms_error
    Getting Pages deployment status...
    Current status: deployment_perms_error
    Error: Timeout reached, aborting!
    Error: Timeout reached, aborting!
samhh added a commit to unsplash/mercury that referenced this issue Jun 26, 2023
@antonengelhardt
Copy link

Thanks everyone. It worked.

Additionally, i added the following for my Rust project:

echo "<meta http-equiv=\"refresh\" content=\"0; url=build_wheel\">" > target/doc/index.html

Maybe the final workflow file is more informative

llvm-beanz added a commit to llvm-beanz/DirectXShaderCompiler that referenced this issue Jul 3, 2023
I found other users reporting a similar issue:

actions/deploy-pages#188

The root cause seems to be that the deploy-pages action changed to stop
correcting permissions problems in the upload since it was slowing down
deployment. The recommended fix is to set the permissions before
uploading the artifact.

Let's see if this works.
llvm-beanz added a commit to microsoft/DirectXShaderCompiler that referenced this issue Jul 5, 2023
I found other users reporting a similar issue:

actions/deploy-pages#188

The root cause seems to be that the deploy-pages action changed to stop
correcting permissions problems in the upload since it was slowing down
deployment. The recommended fix is to set the permissions before
uploading the artifact.

Let's see if this works.

Fixes #5376
@JamesMGreene
Copy link
Contributor

@onbjerg

Hopefully that was just it, although I feel like this should have been a breaking version bump on @actions/upload-pages-artifact? 😄

I agree. I'm going to revert that change in the v1 line for upload-pages-artifact and cut a new v2.0.0 / v2 release for the chmod removal. Sorry about that! 😅

I'll drop an update here once that's cleaned up.

@JamesMGreene
Copy link
Contributor

JamesMGreene commented Jul 10, 2023

@onbjerg Updates on actions/upload-pages-artifact: 🚀

  • The chmod commands have been added back in v1.0.10 and the latest v1 major tag
  • The chmod commands have been removed (again) in v2.0.0 and the new v2 major tag

Thanks again for the constructive feedback! 🙇🏻

@JamesMGreene
Copy link
Contributor

The part that most concerns me now is that it sounds like the deployment_perms_error status wasn't treated as a terminating/final status, which it should've been. 🤔

And then these lines repeating over a hundred times:

Getting Pages deployment status...
Current status: deployment_perms_error

Followed by:

Error: Timeout reached, aborting!
Error: Timeout reached, aborting!
Canceling Pages deployment...
Canceled deployment with ID <...>

We should still investigate and/or write a test for that scenario. 🧪

@JamesMGreene
Copy link
Contributor

JamesMGreene commented Jul 10, 2023

Ah, the repetitive error status polling until timing out was unfortunately a clerical error on our part: we had not yet published the latest release containing the changes from PR #187.

If you update to use v2.0.3 or the latest v2 major tag, the repetitive status polling should now be gone in the case of an file permissions error.

Such errors will need to be corrected before attempting to deploy, by doing something similar to one of the following:

  • correcting your file permissions ahead of time so that they are already correct in git when checking them out from the repository
  • using the actions/upload-pages-artifact@v1 tag, specifically (@v2 removed the formerly built-in chmod fix as it causes unnecessary slowdowns if your file permissions are already correct)
  • adding another step into your Actions workflow before uploading the Pages artifact to fix any invalid permissions, e.g. the example fixes included in the README of actions/upload-pages-artifact@v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants