-
Notifications
You must be signed in to change notification settings - Fork 587
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
[rush] Design proposal: push notifications to users through CLI #4782
Comments
We should standardize the name of the feature:
As far as retrieving the latest messages, the main requirements are:
Based on these requirements, I am leaning towards a model where the data is stored in the Git # shallow clone + treeless partial clone + no checkout
# (in our huge monorepo, this takes 6 seconds)
git clone --filter=tree:0 --depth=1 --branch=master --no-checkout https://example.com/my-monorepo.git
cd my-monorepo
# sparse checkout
git config core.sparseCheckout true
echo common/config/rush/ > .git/info/sparse-checkout
# Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git checkout main
|
Initial implementation here: #4801 |
Would it better to implement this feature with rush plugin? And Rush can provide (or build-in) a rush plugin implementation with the git repo fashion. IMHO, it could provide a more extendibility for advance users. At the same time, new users can also use it in a few steps with the official rush plugin. By using rush plugin, I am pointing to that Rush can accept different way to get the notice events data by different rush plugins. As this diagram shows, the majority logic of |
Maintainers: @octogonz, @g-chao
Summary
We want to have a mechanism to let Monorepo maintainers be able to push notifications during users' day to day development activities.
Problem
As the Monorepo maintainer team, we need to perform upgrades like Node.js, PNPM, etc, and promote new features like Sparo to end users. Besides the regular notification channel, like messages and e-mails, can we push these nofications to users' CLI command activities?
An example
Feature requirements
warning lasts forever)
Implementation
Where are the notices stored?
Option 1: Node.js service / cloud CDN
It requires additional effort to implement the service.
Option 2: NPM package (latest version of package, install tarball)
Creating new alerts involves NPM publishing which can be cumbersome, also you need a private registry (e.g GitHub projects usually don't have one)
Option 3: Store in a Git branch in the same repo
How do we fetch the data?
Where store state?
Rush global temp folder:
~/.rush/notices-state.json
Workflow
notices-state.json
is up to date.Let's say we go with option 3 mentioned in the above section.
1.1 We need to define a way to let users config the notice settings, we can put this configuration under
common/config/rush/rush-notices.json
Here is an example:
1.2 Rush process read the notices config, process them based on repo's situation and save the final state to the Rush temp folder, we can call it
common/temp/notices-state.json
.Here is an example:
~/.rush/notices-state.json
has any notices thereThe text was updated successfully, but these errors were encountered: