Skip to content

Conversation

vpaiu
Copy link
Contributor

@vpaiu vpaiu commented Oct 2, 2025

Description of changes:

  • The scripts/build-artifacts.sh script will now patch the build artifacts with the ignored-errors/common-ignored-errors.json file.

Testing:

  • Executed the Build Code Editor Targets workflow and checked the generated artifacts to see if the patching worked.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@vpaiu vpaiu requested a review from a team as a code owner October 2, 2025 07:49
@vpaiu vpaiu had a problem deploying to security-scanning-workflow-env October 2, 2025 07:49 — with GitHub Actions Failure
@vpaiu vpaiu had a problem deploying to security-scanning-workflow-env October 2, 2025 07:49 — with GitHub Actions Failure
@vpaiu vpaiu had a problem deploying to security-scanning-workflow-env October 2, 2025 07:57 — with GitHub Actions Failure
local config_file="$present_working_dir/configuration/$target.json"
if [ -f "$config_file" ]; then
local ignored_errors_path=$(jq -r '.ignoredErrors.path' "$config_file")
local ignored_errors_file="$present_working_dir/$ignored_errors_path/common-ignored-errors.json"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ignored_errors directory is specified in each target's configuration file because it allows us to define multiple ignored errors JSON files. So instead of checking for just a single file named common-ignored-errors.json, we should do a check here for all .JSON files present in the $ignored_errors_path directory and copy ignored errors from all files.

There should be 3 logical steps here:

  1. First step is to look for all .json files in a common-ignored-errors directory. I know this doesn't exist right now but we'll need to create one and move the common-ignored-errors.json to that directory.
  2. Second step is to check for all ignored files .json files in the directory defined in target's configuration file.
  3. And lastly we merge all of them together in one JSON and copy it over.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented the improvements mentioned above.
Tested by running the patching on built artifacts locally.

@vpaiu vpaiu had a problem deploying to security-scanning-workflow-env October 2, 2025 09:12 — with GitHub Actions Failure
@vpaiu vpaiu had a problem deploying to security-scanning-workflow-env October 2, 2025 09:12 — with GitHub Actions Failure
@vpaiu vpaiu merged commit 2caabe3 into aws:main Oct 2, 2025
3 of 6 checks passed
@vpaiu vpaiu deleted the ignored-errors-patching branch October 2, 2025 09:24
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