Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
591dc9a
fix(amazon q): add pl/1, bms filetypes #6067
scottwritescode Dec 2, 2024
d4b0ede
test(codewhisperer): disable Auto Scan after test case #6122
roger-zhangg Dec 2, 2024
aa332da
feat(amazonq): Re-invent 2024 release (#6127)
jpinkney-aws Dec 3, 2024
c933e68
Release 3.37.0
Dec 3, 2024
754b3a3
Release 1.39.0
Dec 3, 2024
fec09f5
Merge master into feature/postreinvent
aws-toolkit-automation Dec 3, 2024
a5a7a46
Update version to snapshot version: 1.40.0-SNAPSHOT
Dec 3, 2024
967fbe4
Update version to snapshot version: 3.38.0-SNAPSHOT
Dec 3, 2024
487941e
Merge release into master
Dec 3, 2024
cd0847d
Merge master into feature/postreinvent
aws-toolkit-automation Dec 3, 2024
c4f965f
fix(amazonq): /docs -> /doc in readme (#6131)
jpinkney-aws Dec 3, 2024
09425b6
Merge master into feature/postreinvent
aws-toolkit-automation Dec 3, 2024
9a97f8a
ci(run_and_report): remove workaround for vscode 1.68 #6121
Hweinstock Dec 3, 2024
d453a15
Merge master into feature/postreinvent
aws-toolkit-automation Dec 3, 2024
337959a
docs: treat all work as PUBLIC #6125
justinmk3 Dec 3, 2024
be4b42b
Merge master into feature/postreinvent
aws-toolkit-automation Dec 3, 2024
6d5e016
refactor(logs): drop "Amazon Q Logs" channel and just have "Amazon Q"…
nkomonen-amazon Dec 3, 2024
2b49a5d
telemetry(amazonq): differentiate Internal vs External users (#6136)
laileni-aws Dec 3, 2024
50ccef5
Merge master into feature/postreinvent
aws-toolkit-automation Dec 3, 2024
848b6bb
config(repository): update codeowners #6141
Jurredr Dec 4, 2024
0419e0f
Merge master into feature/postreinvent
aws-toolkit-automation Dec 4, 2024
59acbc6
feat(toolkit): Upgrade amazon-states-language-service to 1.13.0 #6139
elvin-hwang Dec 4, 2024
8b08ef4
fix(amazonq): progress bar persists after cancelling README creation …
avi-alpert Dec 4, 2024
c7597ea
Merge master into feature/postreinvent
aws-toolkit-automation Dec 4, 2024
5987252
deps(amazonq): update mynah ui to 4.21.0 (#6130)
jpinkney-aws Dec 4, 2024
3d72353
Merge master into feature/postreinvent
aws-toolkit-automation Dec 4, 2024
92f9ae3
fix(amazonq): missing @workspace command on welcome tab (#6145)
jpinkney-aws Dec 4, 2024
c30cf3a
Merge master into feature/postreinvent
aws-toolkit-automation Dec 4, 2024
d74f96c
ci: codecov always fails #6146
justinmk3 Dec 4, 2024
346a06e
Merge master into feature/postreinvent
aws-toolkit-automation Dec 4, 2024
2905eb8
deps(cross-spawn): update cross-spawn to 7.0.5 #6147
Hweinstock Dec 4, 2024
cec8218
ci: codecov doesn't run in Github Actions
justinmk3 Dec 4, 2024
c8bfe2f
test(flaky): fix unresolved promise causing linux failures (#6088)
Hweinstock Dec 4, 2024
a505edb
ci: codecov "patch" check
justinmk3 Dec 4, 2024
ffd94b4
Merge #6150 from justinmk3/fixcodecov
justinmk3 Dec 4, 2024
7fe8a25
Merge master into feature/postreinvent
aws-toolkit-automation Dec 4, 2024
e46500e
fix(logs): avoid logging EC2 ARN on commands #6152
Hweinstock Dec 4, 2024
4c38aab
feat(ec2): dry run connection script to surface errors earlier. (#6037)
Hweinstock Dec 5, 2024
95b777c
ci: require space at start of // comment #6112
justinmk3 Dec 5, 2024
7f90d56
refactor(ec2): avoid logging somewhat sensitive data (#6149)
Hweinstock Dec 5, 2024
3a39b10
feat(amazonq): add job ID to Transformation Hub #6154
dhasani23 Dec 5, 2024
24b1585
Merge master into feature/postreinvent
aws-toolkit-automation Dec 5, 2024
83aac85
fix(amazonq): prompt to choose a folder for /doc #6159
avi-alpert Dec 5, 2024
016e478
telemetry(amazon q): metrics after one/multiple diffs form selection …
ntarakad-aws Dec 5, 2024
6de9de2
Merge master into feature/postreinvent
aws-toolkit-automation Dec 5, 2024
f601d89
feat(amazonq): Add acknowledgement button for disclaimer (#6151)
jpinkney-aws Dec 6, 2024
1c337a6
Merge master into feature/postreinvent
aws-toolkit-automation Dec 6, 2024
11c35ae
docs(ec2): add details about `authorized_keys`override (#6157)
Hweinstock Dec 6, 2024
3f2ee9e
refactor(ec2): pass log level to connect script (#6161)
Hweinstock Dec 6, 2024
2a404c4
telemetry(amazonq): UTG sends plaintext instead of python for amazonq…
laileni-aws Dec 6, 2024
1ed440a
Merge master into feature/postreinvent
aws-toolkit-automation Dec 6, 2024
7996a0b
fix(amazonq): Improved Code Fix generation for code review issues (#6…
ashishrp-aws Dec 6, 2024
58e6bbf
Merge master into feature/postreinvent
aws-toolkit-automation Dec 6, 2024
33b791e
fix(amazonq): /dev to support upload of nested Dockerfiles #6115
michaellandi Dec 6, 2024
ba3a388
fix(amazonq): prompt user to choose a folder in the chat for /doc
KevinDing1 Dec 6, 2024
a954f49
Merge master into feature/postreinvent
aws-toolkit-automation Dec 6, 2024
1ebb05a
Merge pull request #6177 from KevinDing1/master
KevinDing1 Dec 6, 2024
d3abef0
Merge master into feature/postreinvent
aws-toolkit-automation Dec 6, 2024
e0c153f
fix(amazonq): use fsPath for project name #6176
ctlai95 Dec 7, 2024
9f5bfe4
fix(amazonq): Improved LLM code review for file review #6162
ashishrp-aws Dec 7, 2024
5f76b56
deps(core): update dependencies #6169
jpinkney-aws Dec 7, 2024
38850f7
fix(amazonq): update "explore agents" button on hover #6170
jpinkney-aws Dec 7, 2024
226dd6f
telemetry(amazonq): requestId for amazonq_utgGenerateTests event #6181
laileni-aws Dec 9, 2024
e300353
build(jscpd): validate branch name before running CI (#6124)
Hweinstock Dec 9, 2024
73d6dd6
build(ci): only validate branch name on pull request (#6190)
Hweinstock Dec 9, 2024
292e35e
Merge feature/postreinvent
justinmk3 Dec 9, 2024
b80529e
test(amazonq): more tests for /transform #6183
dhasani23 Dec 9, 2024
0ba37d8
Merge 'public/master' into feature/cwltail
justinmk3 Dec 9, 2024
9ab2df0
lint
justinmk3 Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
mocha: true,
es2024: true,
},
plugins: ['@typescript-eslint', 'unicorn', 'header', 'security-node', 'aws-toolkits'],
plugins: ['@typescript-eslint', '@stylistic', 'unicorn', 'header', 'security-node', 'aws-toolkits'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
Expand Down Expand Up @@ -113,6 +113,20 @@ module.exports = {
'no-constant-condition': ['error', { checkLoops: false }],
'no-empty': 'off',

// https://eslint.style/rules/default/spaced-comment
// Require space after // comment.
'@stylistic/spaced-comment': [
'error',
'always',
{
block: {
markers: ['!'], // Allow the /*!…*/ license header.
// exceptions: ['*'],
// balanced: true
},
},
],

// Rules from https://github.com/sindresorhus/eslint-plugin-unicorn
// TODO: 'unicorn/no-useless-promise-resolve-reject': 'error',
// TODO: 'unicorn/prefer-at': 'error',
Expand Down
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
* @aws/aws-ides-team
packages/core/src/codewhisperer/ @aws/codewhisperer-team
packages/core/src/amazonqFeatureDev/ @aws/earlybird
packages/core/src/codewhispererChat/ @aws/dexp
packages/core/src/amazonq/ @aws/dexp
packages/core/src/codewhispererChat/ @aws/flare
packages/core/src/amazonq/ @aws/flare
packages/core/src/awsService/accessanalyzer/ @aws/access-analyzer
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

---

<!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md -->
- Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time.
- Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).

License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
86 changes: 0 additions & 86 deletions .github/workflows/copyPasteDetection.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/lintbranch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Check that branch name conforms to GitHub naming convention:
// https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names#naming-branches-and-tags

// To run self-tests,
// node lintbranch.js test
// TODO: deduplicate code from lintbranch.js and lintcommit.js.

function isValid(branchName) {
const branchNameRegex = /^[a-zA-Z][a-zA-Z0-9._/-]*$/

return branchNameRegex.test(branchName)
}

function run(branchName) {
if (isValid(branchName)) {
console.log(`Branch name "${branchName}" is valid.`)
process.exit(0)
} else {
const helpUrl =
'https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names#naming-branches-and-tags'
console.log(`Branch name "${branchName}" is invalid see ${helpUrl} for more information.`)
process.exit(1)
}
}

function _test() {
const tests = {
'feature/branch-name': true,
feature_123: true,
'my-branch': true,
'123invalid-start': false,
'!invalid@start': false,
'': false,
'another/valid-name134': true,
'feature/123";id;{echo,Y2F0IC9ldGMvcGFzc3dk}|{base64,-d}|{bash,-i};#': false,
}

let passed = 0
let failed = 0

for (const [branchName, expected] of Object.entries(tests)) {
const result = isValid(branchName)
if (result === expected) {
console.log(`✅ Test passed for "${branchName}"`)
passed++
} else {
console.log(`❌ Test failed for "${branchName}" (expected "${expected}", got "${result}")`)
failed++
}
}

console.log(`\n${passed} tests passed, ${failed} tests failed`)
}

function main() {
const mode = process.argv[2]

if (mode === 'test') {
_test()
} else if (mode === 'run') {
run(process.argv[3])
} else {
throw new Error(`Unknown mode: ${mode}`)
}
}

main()
93 changes: 90 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Validate Branch name
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref != ''}}
env:
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
run: |
node "$GITHUB_WORKSPACE/.github/workflows/lintbranch.js" run "$BRANCH_NAME"
- name: Check PR title
run: |
node "$GITHUB_WORKSPACE/.github/workflows/lintcommit.js"
Expand All @@ -55,6 +61,87 @@ jobs:
- run: npm run testCompile
- run: npm run lint

jscpd:
needs: lint-commits
if: ${{ github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
env:
NODE_OPTIONS: '--max-old-space-size=8192'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Fetch fork upstream
env:
REPO_NAME: ${{ github.event.pull_request.head.repo.full_name }}
run: |
git remote add forkUpstream https://github.com/$REPO_NAME # URL of the fork
git fetch forkUpstream # Fetch fork

- name: Compute git diff
env:
CURRENT_BRANCH: ${{ github.head_ref }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
run: git diff --name-only origin/$TARGET_BRANCH forkUpstream/$CURRENT_BRANCH > diff_output.txt

- run: npm install -g jscpd

- run: jscpd --config "$GITHUB_WORKSPACE/.github/workflows/jscpd.json"

- if: always()
uses: actions/upload-artifact@v4
with:
name: unfiltered-jscpd-report
path: ./jscpd-report.json

- name: Filter jscpd report for changed files
run: |
if [ ! -f ./jscpd-report.json ]; then
echo "jscpd-report.json not found"
exit 1
fi
echo "Filtering jscpd report for changed files..."
CHANGED_FILES=$(jq -R -s -c 'split("\n")[:-1]' diff_output.txt)
echo "Changed files: $CHANGED_FILES"
jq --argjson changed_files "$CHANGED_FILES" '
.duplicates | map(select(
(.firstFile?.name as $fname | $changed_files | any(. == $fname)) or
(.secondFile?.name as $sname | $changed_files | any(. == $sname))
))
' ./jscpd-report.json > filtered-jscpd-report.json
cat filtered-jscpd-report.json

- name: Check for duplicates
run: |
if [ $(wc -l < ./filtered-jscpd-report.json) -gt 1 ]; then
echo "filtered_report_exists=true" >> $GITHUB_ENV
else
echo "filtered_report_exists=false" >> $GITHUB_ENV
fi
- name: upload filtered report (if applicable)
if: env.filtered_report_exists == 'true'
uses: actions/upload-artifact@v4
with:
name: filtered-jscpd-report
path: ./filtered-jscpd-report.json

- name: Fail and log found duplicates.
if: env.filtered_report_exists == 'true'
run: |
cat ./filtered-jscpd-report.json
echo "Duplications found, failing the check."
exit 1

macos:
needs: lint-commits
name: test macOS
Expand Down Expand Up @@ -84,7 +171,7 @@ jobs:
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
uses: codecov/codecov-action@v5
with:
flags: macos-toolkit-unittests
Expand All @@ -95,7 +182,7 @@ jobs:
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
uses: codecov/codecov-action@v5
with:
flags: macos-amazonq-unittests
Expand Down Expand Up @@ -154,7 +241,7 @@ jobs:
env:
# Unset NODE_OPTIONS because of https://github.com/codecov/uploader/issues/475
NODE_OPTIONS: ''
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.ref == 'master' }}
if: ${{ github.repository == 'aws/aws-toolkit-vscode' && github.event_name == 'pull_request' && github.base_ref == 'master' }}
uses: codecov/codecov-action@v5
with:
flags: windows-unittests
Expand Down
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,12 @@ You can find documentation to create VSCode IDE settings for CodeCatalyst bluepr

Before sending a pull request:

1. Treat all work as PUBLIC. Private `feature/x` branches will _not_ be squash-merged at release time. This has several benefits:
- Avoids mistakes (accidental exposure to public)!
- Avoids needing to erase (squash-merge) history.
1. Check that you are working against the latest source on the `master` branch.
2. Check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. Open an issue to discuss any significant work.
1. Check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
1. Open an issue to discuss any significant work.

To send a pull request:

Expand Down
6 changes: 1 addition & 5 deletions buildspec/shared/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@

# Ignore these patterns when deciding if the build should fail.
# - "waiting for browser": from `ssoAccessTokenProvider.test.ts`, unclear how to fix it.
# - "Webview is disposed": only happens on vscode "minimum" (1.68.0)
# - "HTTPError: Response code …": caused by github rate-limiting.
# - "npm WARN deprecated querystring": transitive dep of aws sdk v2 (check `npm ls querystring`), so that's blocked until we migrate to v3.
_ignore_pat='Timed-out waiting for browser login flow\|HTTPError: Response code 403\|HTTPError: Response code 404\|npm WARN deprecated querystring\|npm WARN deprecated'
if [ "$VSCODE_TEST_VERSION" = 'minimum' ]; then
_ignore_pat="$_ignore_pat"'\|Webview is disposed'
fi
_ignore_pat='HTTPError: Response code 403\|HTTPError: Response code 404\|npm WARN deprecated querystring\|npm WARN deprecated'

# Do not print (noisy) lines matching these patterns.
# - "ERROR:bus… Failed to connect to the bus": noise related to "xvfb". https://github.com/cypress-io/cypress/issues/19299
Expand Down
Loading
Loading