use tmp folder to generate 1095a pdfs instead of aws folder#175
Merged
use tmp folder to generate 1095a pdfs instead of aws folder#175
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://app.clickup.com/t/868hj9ch3
Converting the Polypress pods from a StatefulSet to Deployment-based pods introduced an issue where 1095-A notices were still being appended to the /aws folder.
To resolve this, instead of creating and appending files to the /aws directory, I am using the temporary (/tmp) directory to generate the documents and then cleaning them up afterward.
This pull request updates the way file paths are determined for 1095A document generation and storage, making the logic conditional based on whether the S3 upload feature is enabled. The changes centralize the folder path logic and improve maintainability by reducing duplication.
Path management improvements:
base_folder_pathmethod that determines the base directory for storing 1095A documents, switching between a local folder and a temporary directory based on the:upload_paper_notices_to_s3feature flag.create_folderto use the newbase_folder_pathmethod, ensuring consistency across the codebase.base_folder_pathfor constructing file and folder paths, replacing hardcoded path logic. [1] [2]