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

error_count input name is confusing #250

Open
TWiStErRob opened this issue Oct 25, 2023 · 6 comments
Open

error_count input name is confusing #250

TWiStErRob opened this issue Oct 25, 2023 · 6 comments

Comments

@TWiStErRob
Copy link

    steps:
      - name: "Deploy to GitHub Pages"
        id: deployment
        uses: actions/deploy-pages@v2
        with:
          error_count: 0

I might've mis-interpreted the error_count when initially configuring the action. I want to allow no errors, however based on the below log this error_count seems to mean deployment_in_progress_poll_count or something like it.

Created deployment for b6872282209cb2c94d458dcc594dfddd82d733b9, ID: b6872282209cb2c94d458dcc594dfddd82d733b9
Getting Pages deployment status...
Current status: syncing_files
Error: Too many errors, aborting!
Error: Failed with status code: 0
Canceling Pages deployment...
Canceled deployment with ID b6872282209cb2c94d458dcc594dfddd82d733b9
@JamesMGreene JamesMGreene added the wontfix This will not be worked on label Nov 20, 2023
@JamesMGreene JamesMGreene self-assigned this Nov 20, 2023
@JamesMGreene
Copy link
Contributor

There's a brief parameter description included in the Action manifest:

deploy-pages/action.yml

Lines 16 to 17 in 03b62d1

error_count:
description: 'Maximum number of status report errors before cancelling a deployment (default: 10)'

Fair misunderstanding, especially since we shouldn't really allow error_count: 0. That causes the action to fail even if there are 0 errors when it does the check. 😅 🤦

The behavior you're describing would be achieved by error_count: 1, as in "fail on the first error".

I see you also found a similar write-up in:

We may consider revising the naming but, for now, error_count: 1 achieves the desired behavior.

Apologies for the confusion! ❤

@JamesMGreene JamesMGreene closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
@TWiStErRob
Copy link
Author

Thanks, makes sense.

It's the good old "threshold problem". Over at detekt we also had similar problems and they're being renamed in the upcoming major to clarify.

I'm curious if this issue will get more upvotes in the coming year, especially if/when this upload approach goes out of beta and adoption grows.

@JamesMGreene
Copy link
Contributor

I'm curious if this issue will get more upvotes in the coming year, especially if/when this upload approach goes out of beta and adoption grows.

Oh, we're waaaaay out of beta. 😅 This action is involved in more than 2 million Pages deployments per week.

We might be open to renaming the parameter in a future major release, though. 🤷
Any naming suggestions?

@TWiStErRob
Copy link
Author

I was referring to this "Beta":
image

I think you said it best

error_count: 1, as in "fail on the first error".

i.e. fail_on_error_count: 5

I think maybe: allowed_status_failures: 4 would be an even better name. But it implies that during migration users have to subtract one from their config. Default can stay as it doesn't really matter if it fails on 10th or 11th.

Another alternative could be status_report_retries: 4.

@JamesMGreene JamesMGreene reopened this Nov 26, 2023
@JamesMGreene
Copy link
Contributor

Sorry to be wishy-washy, but I'm going to reopen this so the feedback isn't lost. 😅

@JamesMGreene JamesMGreene removed the wontfix This will not be worked on label Nov 26, 2023
@JamesMGreene JamesMGreene removed their assignment Nov 26, 2023
@TWiStErRob
Copy link
Author

Sorry to be wishy-washy, but I'm going to reopen this so the feedback isn't lost. 😅

Up to you how to handle this. Feedback is a weird thing, it's not always actionable 😇

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

2 participants