Skip to content

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

Merged
nborges-aws merged 5 commits intomainfrom
nickdb/v2updateAvailable
Jan 23, 2025
Merged

Add feature to notify users of new plugin version availability#318
nborges-aws merged 5 commits intomainfrom
nickdb/v2updateAvailable

Conversation

@nborges-aws
Copy link
Copy Markdown
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.

Comment thread plugin/src/software/aws/toolkits/eclipse/amazonq/util/UpdateUtils.java Outdated
Comment thread plugin/src/software/aws/toolkits/eclipse/amazonq/util/UpdateUtils.java Outdated
Comment thread plugin/META-INF/MANIFEST.MF Outdated
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
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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
@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