Skip to content

Build: report "Build canceled" when sending VCS build status' description for a particular commit #8998

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

Open
pllim opened this issue Mar 6, 2022 · 7 comments
Assignees
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@pllim
Copy link
Contributor

pllim commented Mar 6, 2022

Example: astropy/astropy#12928

PR status: docs/readthedocs.org:astropy Pending — Read the Docs build is in progress!

But when you click on "Details", it goes to https://readthedocs.org/projects/astropy/builds/16281860/ that says Error - Build cancelled by user.

Expectation: PR status says "build has been canceled by user" or something to that effect with a ❌ .

@humitos
Copy link
Member

humitos commented Mar 7, 2022

Hi @pllim! I'm not able to reproduce this issue. I tried with our testing project and it worked as you expect readthedocs/test-builds#2082

Does the Github status report work properly for your project usually? I saw a message in the logs saying that there were permissions problems and the status wasn't able to be sent.

@humitos humitos added Needed: replication Bug replication is required Support Support question labels Mar 7, 2022
@pllim
Copy link
Contributor Author

pllim commented Mar 7, 2022

I think usually it works. I'll keep an eye out and report back though .

@stsewd
Copy link
Member

stsewd commented Mar 7, 2022

The message says the build failed

docs/readthedocs.org:test-builds — Read the Docs build failed!

I think it is better if the message says the build was cancelled instead.

@humitos humitos added the Needed: more information A reply from issue author is required label Mar 15, 2022
@pllim
Copy link
Contributor Author

pllim commented Mar 23, 2022

Yes, now it reports back as failed. Maybe what I originally reported was transient.

I think it is better if the message says the build was cancelled instead.

I completely agree. That would be more consistent with other CI providers. Thanks!

@no-response no-response bot removed the Needed: more information A reply from issue author is required label Mar 23, 2022
@humitos humitos self-assigned this Mar 28, 2022
@humitos
Copy link
Member

humitos commented Mar 28, 2022

Related to #9040

@humitos humitos changed the title RTD PR builder: Canceling a job does not report as canceled back to PR Build: report "Build canceled" when sending VCS build status' description for a particular commit Mar 29, 2022
@humitos humitos added Improvement Minor improvement to code and removed Support Support question Needed: replication Bug replication is required labels Mar 29, 2022
@humitos
Copy link
Member

humitos commented Mar 29, 2022

To make this possible, the code needs some refactoring. Currently, we are only sending the state (failed, pending, success) and we use a constant SELECT_BUILD_STATUS to find the description to be sent. However, we would need either:

  • pass the reason to the function that sends the message (
    github_build_state = SELECT_BUILD_STATUS[state]['github']
    description = SELECT_BUILD_STATUS[state]['description']
    )
  • pass the description itself when the function is called

To do this, we need to modify the util function, the task, and both service methods at least.

@humitos humitos added the Needed: design decision A core team decision is required label Apr 7, 2022
@zmbc
Copy link

zmbc commented Aug 23, 2023

Beyond just the message, it is surprising to me that cancelling the build returns a failure status. I know that GitHub Actions for instance can return a "cancelled" status, which doesn't have a red X that makes things look like they failed. Is that a feature GitHub allows third-party tools to use? Or, could it make more sense to just leave the status as pending?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

4 participants