Skip to content

fix: check pyproject.toml file exists before opening it - #480

Merged
klmcadams merged 3 commits into
mainfrom
fix/file-dne
May 6, 2024
Merged

klmcadams merged 3 commits into
mainfrom
fix/file-dne

Conversation

@klmcadams

Copy link
Copy Markdown
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
Copy Markdown
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
@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
steps:
- name: "Run documentation style checks"
uses: ansys/actions/doc-style@main
uses: ansys/actions/doc-style@fix/file-dne

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

RobPasMue commented May 7, 2024 •

Copy link
Copy Markdown
Member

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