Skip to content

Commit 00680f7

Browse files
tomcat323tomzu
andauthored
fix(release): added beta check and dummy version logics (aws#6470)
## Problem in aws#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: <img width="1074" alt="Screenshot 2025-01-30 at 12 45 07 PM" src="https://github.com/user-attachments/assets/ee0b8df7-cd89-4e44-a99b-9746134a8aa9" /> unblocks: https://pipelines.amazon.com/pipelines/AWSVSCodeInfrastructure --------- Co-authored-by: tomzu <[email protected]>
1 parent 21c7f12 commit 00680f7

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

buildspec/release/70checkmarketplace.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,32 @@ phases:
2222
build:
2323
commands:
2424
- VERSION=$(node -e "console.log(require('./packages/${TARGET_EXTENSION}/package.json').version);")
25-
# get extension name
25+
# get extension name, if in beta, use some hard-coded recent version
2626
- |
2727
if [ "${TARGET_EXTENSION}" = "amazonq" ]; then
2828
extension_name="amazonwebservices.amazon-q-vscode"
29+
[ "$STAGE" != "prod" ] && VERSION="1.43.0" || true
2930
elif [ "${TARGET_EXTENSION}" = "toolkit" ]; then
3031
extension_name="amazonwebservices.aws-toolkit-vscode"
32+
[ "$STAGE" != "prod" ] && VERSION="3.42.0" || true
3133
else
3234
echo checkmarketplace: "Unknown TARGET_EXTENSION: ${TARGET_EXTENSION}"
3335
exit 1
3436
fi
35-
# keep reinstalling the extension until the desired version is updated. Otherwise fail on codebuild timeout (1 hour).
37+
if [ "$STAGE" != "prod" ]; then
38+
echo "checkmarketplace: Non-production stage detected. Installing hardcoded version '${VERSION}'."
39+
fi
40+
# keep installing the desired extension version until successful. Otherwise fail on codebuild timeout (1 hour).
3641
- |
3742
while true; do
3843
code --uninstall-extension "${extension_name}" --no-sandbox --user-data-dir /tmp/vscode
39-
code --install-extension ${extension_name} --no-sandbox --user-data-dir /tmp/vscode
44+
code --install-extension "${extension_name}@${VERSION}" --no-sandbox --user-data-dir /tmp/vscode || true
4045
cur_version=$(code --list-extensions --show-versions --no-sandbox --user-data-dir /tmp/vscode | grep ${extension_name} | cut -d'@' -f2)
4146
if [ "${cur_version}" = "${VERSION}" ]; then
4247
echo "checkmarketplace: Extension ${extension_name} is updated to version '${cur_version}.'"
4348
break
4449
else
45-
echo "checkmarketplace: Current version '${cur_version}' does not match expected version '${VERSION}'. Retrying..."
50+
echo "checkmarketplace: Expected extension version '${VERSION}' has not been successfully installed. Retrying..."
4651
fi
4752
sleep 120 # Wait for 2 minutes before retrying
4853
done
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"date": "2025-01-30",
3+
"version": "1.45.0-SNAPSHOT",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Allow AB users with an overridden customization to go back to the default customization"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "For security reasons, disabled auto linkify for link texts coming in markdown other than [TEXT](URL) format"
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "Add setting to allow Q /dev to run code and test commands"
16+
}
17+
]
18+
}

0 commit comments

Comments
 (0)