-
Notifications
You must be signed in to change notification settings - Fork 66
Fire alarm support #1428
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
Fire alarm support #1428
Conversation
Before I review, did something weird happen with prettier? Looks like there's a lot of files changed that are just spacing / style changes |
@camden11 It looks like it, because none of these showed as linting errors and all my builds were clean for inlining the i18n variables. 🤔 |
@brandenrodgers I just fixed the linting errors in a separate PR if you pull main they should go away |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic LGTM, just a non-blocking question
|
||
// Ignore alerts on any version tags (like -beta) | ||
// No need for us to send alerts for these beta CLI versions | ||
if (version.includes('-') || targetVersionString.includes('-')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm do you think we'll never want to target beta versions? I could see it being helpful occasionally. Maybe we could exclude them from the more generalized targeting (with *
and >=
etc) but let you target them by specifying the exact version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that idea. This was somewhat of an arbitrary call on my part. I'll add in some support for exact version targeting for beta versions.
Not sure if you already did this (the logic looked like this would work) but I could definitely see a scenario where we want to target buckets. At the very least, the project bucket |
@camden11 yeah agreed. The logic does support it, so I think we should be all set. The way you'd do it is by specifying the bucket (e.g. |
Description and Context
Relies on this LDL PR: HubSpot/hubspot-local-dev-lib#253
This is building on the discovery work that @b-ash did to support Fire Alarm warnings in the CLI. The goal here is to enable ourselves to be able to surface notifications to users on existing CLI versions. We'll be able to surface warnings without devs needing to update their CLI versions. The way I have it set up now, we can target specific CLI versions and also specific commands. This should give us the right amount of granularity. We should put some thought into how we might want to leverage this, because it will be difficult to make changes down the road. The real value in this is being able to target old CLI versions.
Rolling this out:
Behavior:
querySelector
to target specific CLI commands.hs project upload
hs project upload
orhs project init
Open questions:
Screenshots
Here's my rough first draft just to show what this can look like:

The messages mainly have a
title
,severity
, andmessage
that we should be surfacing. I'm not currently doing anything with the severity field.Another thing to consider is that we have an existing update notification system. We'll have to think about how this interacts with that:

TODO
Who to Notify