From 00680f763f99d9a89d8b2d2d69fca6b804192523 Mon Sep 17 00:00:00 2001 From: Tom Zu <138054255+tomcat323@users.noreply.github.com> Date: Fri, 31 Jan 2025 19:57:48 -0500 Subject: [PATCH] fix(release): added beta check and dummy version logics (#6470) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem in https://github.com/aws/aws-toolkit-vscode/pull/6426, a new release pipeline stage was added that checks the marketplace extension has been updated. This PR addes a stage check and only look for an existing version of the extension when in BETA. Output in beta: Screenshot 2025-01-30 at 12 45 07 PM unblocks: https://pipelines.amazon.com/pipelines/AWSVSCodeInfrastructure --------- Co-authored-by: tomzu --- buildspec/release/70checkmarketplace.yml | 13 +++++++++---- packages/amazonq/.changes/1.45.0-SNAPSHOT.json | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 packages/amazonq/.changes/1.45.0-SNAPSHOT.json diff --git a/buildspec/release/70checkmarketplace.yml b/buildspec/release/70checkmarketplace.yml index c4c2314b98f..670dd2c7508 100644 --- a/buildspec/release/70checkmarketplace.yml +++ b/buildspec/release/70checkmarketplace.yml @@ -22,27 +22,32 @@ phases: build: commands: - VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);") - # get extension name + # get extension name, if in beta, use some hard-coded recent version - | if [ "${TARGET_EXTENSION}" = "amazonq" ]; then extension_name="amazonwebservices.amazon-q-vscode" + [ "$STAGE" != "prod" ] && VERSION="1.43.0" || true elif [ "${TARGET_EXTENSION}" = "toolkit" ]; then extension_name="amazonwebservices.aws-toolkit-vscode" + [ "$STAGE" != "prod" ] && VERSION="3.42.0" || true else echo checkmarketplace: "Unknown TARGET_EXTENSION: ${TARGET_EXTENSION}" exit 1 fi - # keep reinstalling the extension until the desired version is updated. Otherwise fail on codebuild timeout (1 hour). + if [ "$STAGE" != "prod" ]; then + echo "checkmarketplace: Non-production stage detected. Installing hardcoded version '${VERSION}'." + fi + # keep installing the desired extension version until successful. Otherwise fail on codebuild timeout (1 hour). - | while true; do code --uninstall-extension "${extension_name}" --no-sandbox --user-data-dir /tmp/vscode - code --install-extension ${extension_name} --no-sandbox --user-data-dir /tmp/vscode + code --install-extension "${extension_name}@${VERSION}" --no-sandbox --user-data-dir /tmp/vscode || true cur_version=$(code --list-extensions --show-versions --no-sandbox --user-data-dir /tmp/vscode | grep ${extension_name} | cut -d'@' -f2) if [ "${cur_version}" = "${VERSION}" ]; then echo "checkmarketplace: Extension ${extension_name} is updated to version '${cur_version}.'" break else - echo "checkmarketplace: Current version '${cur_version}' does not match expected version '${VERSION}'. Retrying..." + echo "checkmarketplace: Expected extension version '${VERSION}' has not been successfully installed. Retrying..." fi sleep 120 # Wait for 2 minutes before retrying done diff --git a/packages/amazonq/.changes/1.45.0-SNAPSHOT.json b/packages/amazonq/.changes/1.45.0-SNAPSHOT.json new file mode 100644 index 00000000000..881d3e94e5a --- /dev/null +++ b/packages/amazonq/.changes/1.45.0-SNAPSHOT.json @@ -0,0 +1,18 @@ +{ + "date": "2025-01-30", + "version": "1.45.0-SNAPSHOT", + "entries": [ + { + "type": "Bug Fix", + "description": "Allow AB users with an overridden customization to go back to the default customization" + }, + { + "type": "Bug Fix", + "description": "For security reasons, disabled auto linkify for link texts coming in markdown other than [TEXT](URL) format" + }, + { + "type": "Feature", + "description": "Add setting to allow Q /dev to run code and test commands" + } + ] +} \ No newline at end of file