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

chore(cli): Update checker background process logging improvement #8762

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

Josh-Walker-GM
Copy link
Collaborator

Description
I recently added a helper for when we need to run background tasks. The aim was to ensure consistent use of spawn options (as they are quite cryptic) and to introduce consistency of the logging for the background processes.

Changes

  1. The background task used to check for redwood updates now uses the background process helper.
    • Output is now found in logs within .redwood/logs
    • The process now has relatively verbose output to aid in debugging if it breaks in the future.
  2. The background process helper now writes some metadata at the head of the log files it creates for the process. This is introduced to ensure relevant data is available should we need to debug the background processes. It looks like so:
Starting log:
 - Time: 2023-06-28T15:23:03.386Z
 - Name: updateCheck (updatecheck)
 - Command: yarn
 - Arguments: node /home/josh/Development/redwood/rw-test-background-logs/node_modules/@redwoodjs/cli/dist/lib/updateCheckExecute.js

Pushed

  1. I'd like to reorganise the .redwood folder further when it comes to the update checker. Currently it has it's own folder updateCheck folder. I'd like to fold everything specifically CLI related into a cli folder and then just have a file something like versions.json inside that folder.

Also adds more verbose output to the function which runs in the background since there is no longer a need to be silent.
@Josh-Walker-GM Josh-Walker-GM added the release:chore This PR is a chore (means nothing for users) label Jun 28, 2023
@jtoar jtoar merged commit e3eabc3 into main Jun 28, 2023
10 of 11 checks passed
@jtoar jtoar deleted the jgmw-cli/background-logs branch June 28, 2023 19:33
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Jun 28, 2023
@jtoar jtoar modified the milestones: next-release, v6.0.0 Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants