-
Notifications
You must be signed in to change notification settings - Fork 312
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
fix: use noop insights by default on maestro #2131
Conversation
@@ -1,31 +1,20 @@ | |||
package maestro.utils | |||
|
|||
object Insights { | |||
object Insights: InsightsInterface { |
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.
IIUC, this doesn't do anything, other than invoking a bunch of listeners. Why do you need a noop version in that case?
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 Insights are only used for CLI, the noop is default implementation that we pass for cloud versions and only override for CLI. Earlier the implementations were coupled inside Orchestra and hence the cloud code.
@@ -0,0 +1,38 @@ | |||
package maestro.utils | |||
|
|||
interface InsightsInterface { |
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.
nit: interfaces shouldn't include "Interface" on their name.
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.
Good point, I'll fix this
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.
Done ✅
159fe78
to
17c6dfe
Compare
Proposed changes
Insights
is a CLI-only concept. We've seen this implementation causing problems on the cloud. This PR provides a noop implementation to Insights by default so that we don't use it on cloud.For CLI the real implementation is passed so that behavior of CLI remains unchanged
Testing
Locally running a command that raises insight. Tapping on optional view that's not there.
Issues fixed