You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Desired User Story: To be able to run a command, such as yarn rw upgrade --info|--status|--check from the cli and find out the current project version -> compared to current release version, and to also be able to find a link to the upgrade guide. It is helpful to read the guides prior to upgrading.
Motivation
We want to check for upgrade availability, and more importantly, display the upgrade guide link manually without having to wait 24 hours. The upgrade process, especially majors, usually requires some prep work. Getting this link within the CLI on demand means users will not have to leave their editor and search for this information.
Detailed proposal
Approach
The current update check middleware uses interval timers to check and display only once every 24 hours. Integrating a manual check involves working with or around these timers. It also uses locking mechanisms to prevent duplicate processes from acting on the same files. I would say we want to keep this in place also.
I imagine two ways of triggering the update check manually:
add -force flag that ignores timers
reset the timers to a time past 24 hours ago - then middleware will trigger and run the update check
[Q] It might be worth adding a function to print the upgrade guide link even if no upgrade is needed? I'm not sure why this would be the case, but maybe?
[Q] What about triggering the check for release candidates, etc? Some users do want to upgrade to the rc... how would the new command check for the tag the user wants to upgrade to and display accordingly?
Summary
Desired User Story: To be able to run a command, such as
yarn rw upgrade --info|--status|--check
from the cli and find out the current project version -> compared to current release version, and to also be able to find a link to the upgrade guide. It is helpful to read the guides prior to upgrading.Motivation
We want to check for upgrade availability, and more importantly, display the upgrade guide link manually without having to wait 24 hours. The upgrade process, especially majors, usually requires some prep work. Getting this link within the CLI on demand means users will not have to leave their editor and search for this information.
Detailed proposal
Approach
The current update check middleware uses interval timers to check and display only once every 24 hours. Integrating a manual check involves working with or around these timers. It also uses locking mechanisms to prevent duplicate processes from acting on the same files. I would say we want to keep this in place also.
I imagine two ways of triggering the update check manually:
Additionally, we probably need a new flag added to the [upgrade cli command] (https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/commands/upgrade.js).
The information that the current check outputs is great, it links to the upgrade guide and shows the current version -> upgrade version. No changes needed there.
https://user-images.githubusercontent.com/56300765/202324200-7cd26df4-2e0f-4887-960a-a9cac031038a.png
[Q] It might be worth adding a function to print the upgrade guide link even if no upgrade is needed? I'm not sure why this would be the case, but maybe?
[Q] What about triggering the check for release candidates, etc? Some users do want to upgrade to the rc... how would the new command check for the tag the user wants to upgrade to and display accordingly?
Related Links
Code: CLI Upgrade Command
Code: upgradeCheck Code
PR (6461): An update middleware to detect and notify users of available updates
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: