ASOC-710 Implemented the --inputfile flag #125
+48
−28
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.
/## Clever Coding Standards Agreement
Clever Coding Standards Agreement
JIRA
ASOC-710
Overview
Implemented the --inputfile flag for sfncli to avoid ARG_MAX limits.
Changes
Added
--inputfileflag insfncli.go:--workdirectoryto be set (since we need a directory to write the file)Updated
TaskRunnerstruct inrunner.go:inputFile boolfield to track the modeNewTaskRunner()constructor to acceptinputFileparameterModified
Process()method inrunner.go:inputFileis enabled:workDirectoryis set (returns error if not)WORK_DIR/input.jsonin the task's temporary directorypath/filepathimport for file path operationsUpdated
README.md:--inputfileflag to the usage sectionTesting
runner_test.go:NewTaskRunner()calls to include the newinputFileparameter (set tofalsefor existing tests to maintain backward compatibility)Rollout
This feature addresses the specific use case where the
api-v3-finalizerworker processes migrations with thousands of district IDs. Payloads regularly exceed 100KB, hitting ARG_MAX limits. With this change, workers can read input from a file instead of parsing command-line arguments.Rollback
Should not affect existing feature.