-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6024 from witness-me/wfs-invalid-json
feat(stepfunctions): Prevent launching Workflow Studio with invalid JSON + save metric refactoring
- Loading branch information
Showing
919 changed files
with
82,512 additions
and
23,695 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: unreliable test | ||
about: Help us monitor our test suite by reporting flaky tests. | ||
labels: tests-ci-cd | ||
--- | ||
|
||
## Test Details | ||
|
||
- Name of test: | ||
- OS of failure: | ||
- VSCode version of failure (minimum/insider/stable): | ||
- Link to failing run: | ||
- Link to failing test: | ||
|
||
## Log of Test Failure | ||
|
||
## Additional Information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"pattern": "packages/**/*.ts", | ||
"ignore": ["**node_modules**", "**dist**", "**/scripts/**"], | ||
"gitignore": true, | ||
"threshold": 3.0, | ||
"minLines": 10, | ||
"output": "./", | ||
"reporters": ["json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.