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

Fix checking PR body & improve error message in CD #318

Merged
merged 1 commit into from
Dec 3, 2021
Merged

Conversation

CasperWA
Copy link
Contributor

@CasperWA CasperWA commented Dec 3, 2021

Description:

There is a minor edge-case where the CD will fail updating the ci/dependabot-updates branch (upon a release), this minor fix sorts out that issue.
(This edge-case was found in Materials-Consortia/optimade-python-tools where similar workflows are used.)

Fixes #319.

It also adds a more informative error message for what steps to do next if the CD workflow fails in a particular step.

Type of change:

  • Bug fix.
  • New feature.
  • Documentation update.

Checklist:

This checklist can be used as a help for the reviewer.

  • Is the code easy to read and understand?
  • Are comments for humans to read, not computers to disregard?
  • Does a new feature has an accompanying new test (in the CI or unit testing schemes)?
  • Has the documentation been updated as necessary?
  • Does this close the issue?
  • Is the change limited to the issue?
  • Are errors handled for all outcomes?
  • Does the new feature provide new restrictions on dependencies, and if so is this documented?

Comments:

@CasperWA CasperWA added bug Something isn't working enhancement New feature or request labels Dec 3, 2021
@francescalb
Copy link
Collaborator

Is there a method to test this?

@CasperWA
Copy link
Contributor Author

CasperWA commented Dec 3, 2021

Is there a method to test this?

The way I tested it originally was locally, to see which method would work - using the gh cli to download particular PR body texts and testing different ways to format it and comparisons in order to ensure that the logic here works.
Essentially the text will be changed once someone clicks the checkboxes - and I think there are some other changes happening automatically if someone accidentally "edits" the body - even without changing anything. The latter is the edge case I suspect happened in the other repository, where the current solution didn't work. This one seems to have been working so far in the other repository :)

@francescalb
Copy link
Collaborator

Is there a method to test this?

The way I tested it originally was locally, to see which method would work - using the gh cli to download particular PR body texts and testing different ways to format it and comparisons in order to ensure that the logic here works. Essentially the text will be changed once someone clicks the checkboxes - and I think there are some other changes happening automatically if someone accidentally "edits" the body - even without changing anything. The latter is the edge case I suspect happened in the other repository, where the current solution didn't work. This one seems to have been working so far in the other repository :)

Thank you for the explanation. Then I think it is safe and good to go with this here as well-

Copy link
Collaborator

@francescalb francescalb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@CasperWA CasperWA merged commit b6c8924 into master Dec 3, 2021
@CasperWA CasperWA deleted the minor-cd-fix branch December 3, 2021 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edge-case fails CD workflow for dependabot
2 participants