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: check pyproject.toml file exists before opening it #480

Merged
merged 3 commits into from
May 6, 2024

Conversation

klmcadams
Copy link
Contributor

doc-style fails in main if pyproject.toml doesn't exist in the repository

@klmcadams klmcadams requested a review from a team as a code owner May 6, 2024 18:11
@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@github-actions github-actions bot added the bug Defects or glitches reported by users or developers label May 6, 2024
@klmcadams klmcadams merged commit ae38d78 into main May 6, 2024
16 checks passed
@klmcadams klmcadams deleted the fix/file-dne branch May 6, 2024 18:28
@klmcadams klmcadams restored the fix/file-dne branch May 6, 2024 18:28
@@ -117,7 +117,7 @@ jobs:
needs: commit-and-branch-style
steps:
- name: "Run documentation style checks"
uses: ansys/actions/doc-style@main
uses: ansys/actions/doc-style@fix/file-dne
Copy link
Member

Choose a reason for hiding this comment

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

Did we really merge this?????

@RobPasMue RobPasMue mentioned this pull request May 7, 2024
@RobPasMue
Copy link
Member

Next time, please make sure you do not merge these kind of changes.... testing on workflow files is not recommended for this reason. We should test on some other independent repo/branch/whatever....

@RobPasMue RobPasMue deleted the fix/file-dne branch May 7, 2024 06:32
@klmcadams
Copy link
Contributor Author

@RobPasMue main was failing, so anyone who was using doc-style@main whose repo did not have the pyproject.toml file was going to experience failures. This change was meant to be temporary and was a quick fix to prevent other repo workflows from failing (if they are referring to main and don't have a pyproject.toml file). Also, the ci_cd file for this repository was not going to pass with doc-style as main since it doesn't have the pyproject.toml file, so I had to change it to the temporary branch in order for it to pass

@RobPasMue
Copy link
Member

RobPasMue commented May 7, 2024

I understand why you did it, don't worry. But next time let's do it a bit differently...

  • In your PR you merged a change on the workflow file for this repo. This workflow was now pointing to your-branch instead of main.
  • When you merge a PR we delete the branch where the feature is implemented meaning that your workflow will now fail since the branch does not exist anymore.
  • I know you didn't delete the branch this time, but the change you did to the workflow file was not needed and under normal circumstances and it would only cause problems.
  • If this happens, its best to contact an admin to "force merge" the PR to main.
  • Also, who is using the actions with main apart from this repo? Not recommended since it might not be stable 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects or glitches reported by users or developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants