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

More robust clean up after unexpected docgen process exits. #8260

Merged
merged 2 commits into from
May 22, 2024

Conversation

hsubox76
Copy link
Contributor

@hsubox76 hsubox76 commented May 22, 2024

  • Put cleanup for both docs and toc generation into a cleanup function that's run on process exit and SIGINT (ctrl-C) to ensure auth files especially are returned to their original state no matter what.
  • Clean top level temp/ json dir before every run.

The cleanup process used to run in a "finally" block which is fine for catching errors caused by the specific code but doesn't account for a SIGINT or some other unexpected interruption.

I think I put enough checks in the cleanup code to make sure the steps don't error but I also wrapped it in a try/catch just in case with a warning to watch out for changed files.

Copy link

changeset-bot bot commented May 22, 2024

⚠️ No Changeset found

Latest commit: 9b7d998

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 22, 2024

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 22, 2024

@hsubox76 hsubox76 marked this pull request as ready for review May 22, 2024 19:01
@hsubox76 hsubox76 requested a review from a team as a code owner May 22, 2024 19:01
@hsubox76 hsubox76 merged commit aa060a7 into master May 22, 2024
36 checks passed
@hsubox76 hsubox76 deleted the ch-docgen-exit branch May 22, 2024 20:59
@firebase firebase locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants