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

Add feature to notify users of new plugin version availability #318

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

nborges-aws
Copy link
Contributor

Issue #313

Description of changes:
This addition sends the user a notification each time a new version of the plugin is made available on the marketplace.
This includes:

  • addition of dependency to decompress XZ file containing version information from eclipse marketplace
  • additional notification type that features "do not show again" checkbox, giving users choice of persistent notification
  • UpdateUtil file which handles fetching version info from eclipse marketplace and determining if notification should be shown

Screenshot:
Screenshot 2025-01-09 at 4 08 18 PM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -9,6 +9,7 @@ Automatic-Module-Name: amazon.q.eclipse
Bundle-ActivationPolicy: lazy
Bundle-Activator: software.aws.toolkits.eclipse.amazonq.plugin.Activator
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.31.0",
org.tukaani.xz,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have an OSGI bundle dependency as well as a Maven dependency? We should only have one or the other. If this library is available through OSGI let's go that route (but also keep a version lock on it).

Keep in mind that we will need to add an entry in our attribution.xml for the new dependency as well: https://github.com/aws/amazon-q-eclipse/blob/main/attribution.xml

@nborges-aws nborges-aws force-pushed the nickdb/v2updateAvailable branch from 05432e4 to 1826699 Compare January 13, 2025 18:18
Comment on lines 98 to 102
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We definitely should not affect other parts of the plugin if this fails, but we should at least log a message here.

@@ -15,6 +15,9 @@ private Constants() {
public static final String LSP_OPT_OUT_TELEMETRY_CONFIGURATION_KEY = "optOutTelemetry";
public static final String LSP_Q_CONFIGURATION_KEY = "aws.q";
public static final String LSP_CW_CONFIGURATION_KEY = "aws.codeWhisperer";
public static final String DO_NOT_SHOW_UPDATE_KEY = "doNotShowUpdate";
public static final String PLUGIN_UPDATE_NOTIFICATION_TITLE = "Amazon Q Update Available";
public static final String PLUGIN_UPDATE_NOTIFICATION_BODY = "Amazon Q plugin version %s is available. Please update for newest features.";
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Please update to receive the latest features and bug fixes.

Comment on lines +120 to +122
private static boolean remoteVersionIsGreater(final Version remote, final Version local) {
return remote.compareTo(local) > 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

One side note - #329 adds support for full semantic versioning of artifacts, and a different dependency (Maven Artifact library) for version constructs. Once that is merged you can switch to using those to get the benefits of being able to diff across labeled versions. Depending on when things get merged that can also be a follow up improvement.

@nborges-aws nborges-aws force-pushed the nickdb/v2updateAvailable branch from 78cec78 to a918f98 Compare January 23, 2025 23:48
@nborges-aws nborges-aws merged commit 7cb28c2 into main Jan 23, 2025
1 check passed
@nborges-aws nborges-aws deleted the nickdb/v2updateAvailable branch January 23, 2025 23:59
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.

2 participants