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

fix: use noop insights by default on maestro #2131

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

amanjeetsingh150
Copy link
Collaborator

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

Copy link

linear bot commented Nov 12, 2024

@@ -1,31 +1,20 @@
package maestro.utils

object Insights {
object Insights: InsightsInterface {
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 {
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ✅

@amanjeetsingh150 amanjeetsingh150 force-pushed the MA-2534-insights-noop-impl branch from 159fe78 to 17c6dfe Compare November 13, 2024 10:25
@amanjeetsingh150 amanjeetsingh150 merged commit 17e67dc into main Nov 14, 2024
8 checks passed
@amanjeetsingh150 amanjeetsingh150 deleted the MA-2534-insights-noop-impl branch November 14, 2024 06:40
rasyid7 pushed a commit to rasyid7/maestro that referenced this pull request Dec 9, 2024
rasyid7 pushed a commit to rasyid7/maestro that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants