Skip to content

feat: write changed files to file not env (IN-1254)#391

Merged
theProf merged 1 commit into
masterfrom
ogrady/changed-files-to-file/IN-1254
Jun 5, 2026
Merged

feat: write changed files to file not env (IN-1254)#391
theProf merged 1 commit into
masterfrom
ogrady/changed-files-to-file/IN-1254

Conversation

@theProf
Copy link
Copy Markdown
Contributor

@theProf theProf commented Jun 5, 2026

TL;DR

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.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 5, 2026

IN-1254

Copy link
Copy Markdown
Contributor Author

theProf commented Jun 5, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vf-service-account
Copy link
Copy Markdown
Contributor

Your development orb has been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link:
https://circleci.com/developer/orbs/orb/voiceflow/common?version=dev:8e44f2b2a37d3e04e896e78d1c14c92543bb8c31

@theProf theProf force-pushed the ogrady/changed-files-to-file/IN-1254 branch from 8e44f2b to 731a0fd Compare June 5, 2026 18:51
@vf-service-account
Copy link
Copy Markdown
Contributor

Your development orb has been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link:
https://circleci.com/developer/orbs/orb/voiceflow/common?version=dev:731a0fdbac81565d739fd599da1964546171ce63

@theProf theProf requested review from junydania and xavidop June 5, 2026 18:52
@theProf theProf marked this pull request as ready for review June 5, 2026 18:52
Copilot AI review requested due to automatic review settings June 5, 2026 18:52
Copy link
Copy Markdown
Contributor Author

theProf commented Jun 5, 2026

Merge activity

  • Jun 5, 7:13 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 5, 7:13 PM UTC: @theProf merged this pull request with Graphite.

@theProf theProf merged commit 9d5f325 into master Jun 5, 2026
6 checks passed
@theProf theProf deleted the ogrady/changed-files-to-file/IN-1254 branch June 5, 2026 19:13
@vf-service-account
Copy link
Copy Markdown
Contributor

Your orb has been published to the CircleCI Orb Registry.
You can view your published orb on the CircleCI Orb Registry at the following link:
https://circleci.com/developer/orbs/orb/voiceflow/common?version=0.113.0

@theProf theProf review requested due to automatic review settings June 5, 2026 19:15
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.

4 participants