You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces the CHANGED_FILES environment variable (which stored file contents inline) with CHANGED_FILES_FILE, a path to a file containing the list of changed files.
What changed?
The get_changed_files command no longer stores the git diff output in a CHANGED_FILES environment variable. Instead, it writes the output directly to a file (defaulting to /tmp/changed_files.txt) and exports CHANGED_FILES_FILE pointing to that path. All consumers (set-if-file-changed, set-service-data-json, and get_modified_charts.sh) have been updated to read from the file path rather than the inline environment variable.
How to test?
Run a pipeline that uses the get_changed_files command followed by any of the dependent commands (set-if-file-changed, set-service-data-json, or helm chart detection). Verify that changed files are correctly detected and the appropriate environment variables are set as expected.
Why make this change?
Storing large amounts of file change data inline in an environment variable is fragile — it can break with special characters, newlines, or when the diff is large. Writing to a file is more robust. Additionally, using an absolute path (/tmp/changed_files.txt) ensures the file remains accessible to consumers that set a custom working_directory (e.g. helm jobs), where a relative path would not survive the directory change.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Replaces the
CHANGED_FILESenvironment variable (which stored file contents inline) withCHANGED_FILES_FILE, a path to a file containing the list of changed files.What changed?
The
get_changed_filescommand no longer stores the git diff output in aCHANGED_FILESenvironment variable. Instead, it writes the output directly to a file (defaulting to/tmp/changed_files.txt) and exportsCHANGED_FILES_FILEpointing to that path. All consumers (set-if-file-changed,set-service-data-json, andget_modified_charts.sh) have been updated to read from the file path rather than the inline environment variable.How to test?
Run a pipeline that uses the
get_changed_filescommand followed by any of the dependent commands (set-if-file-changed,set-service-data-json, or helm chart detection). Verify that changed files are correctly detected and the appropriate environment variables are set as expected.Why make this change?
Storing large amounts of file change data inline in an environment variable is fragile — it can break with special characters, newlines, or when the diff is large. Writing to a file is more robust. Additionally, using an absolute path (
/tmp/changed_files.txt) ensures the file remains accessible to consumers that set a customworking_directory(e.g. helm jobs), where a relative path would not survive the directory change.