-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requirements.txt not loaded outside of Docker context #1216
Comments
@wesley-dean-gsa apologies for a little latency (due to annual leave on this side) and thanks for the analysis/debug. |
@wesley-dean-gsa, hi Wes! Long time no talk. Thanks for reporting this issue with all the necessary detail. Expect a PR in the near-term to review. |
OK @wesley-dean-gsa I did some digging between meetings and I realized an oversight in my initial code skim. Our CI/CD has updated significantly since the last git submodule update you are using in the branch behind that PR. We do not even call the But, this repo is a submodule of that oscal-content repo and your codebase too, which is in turn forked from the official upstream fedramp-automation repo maintained by the FedRAMP PMO. So GitHub Action declarations will not be magically fixed by the necessary fix to oscal-content repo in a way that will just "fix the glitch for your team." I just talked with our tech lead Dave about next steps, so, on that note.
Hope that clears things up. Expect more updates shortly. 👋 |
@wesley-dean-gsa, re this:
We just got off the call with the PMO we agreed to send changes to GSA/fedramp-automation. I will work with @volpet2014 and @david-waltermire-nist to bring those changes in, and you can pull them back into your |
Describe the bug
When build/copy-and-convert-content.sh runs, there are two locations (lines 157 and 202) where
python/convert_filetypes.py
is invoked. Theconvert_filetypes.py
script importsruamel.yaml
on line 10.The Dockerfile adds and installs the requirements.txt that downloads the required modules (e.g., the aforementioned ruamel.yaml) so that the Docker image will build and run properly.
However, when run outside of the context of a pre-built Docker container, the required Python modules are not loaded in advance, such as when our (ASAP) builds process (example).
Who is the bug affecting?
ASAP
What is affected by this bug?
Our builds are failing. Because
-e
is not set in the shell script, the failing python3 command does not cause the script to fail which means errors in the script are not surfacing when our workflow runs. That is, it looks like our build is succeeding when, in fact, it is not.When does this occur?
When
copy-and-convert-content.sh
is run withoutpip3 install -r requirement.txt
beforehand (such as when not using a Docker image built with the supplied Dockerfile).How do we replicate the issue?
pip3 install -r requirements.txt
python3 copy-and-convert-content.sh
(this last step may require data to copy and convert in order for the error to occur)
Expected behavior (i.e. solution)
The
copy-and-convert-content.sh
script should do what it's supposed to do.Other Comments
One may wish to update the documentation to include verbiage such as:
Alternatively, one may add the aforementioned
pip3
command tocopy-and-convert-content.sh
, but that would be redundant in many situations.Lastly, please consider setting Bash's
-e
flag so that commands in the script that return non-zero response codes are surfaced when the script is run and using theenv
command for situations where Bash is not installed in/bin/
:The text was updated successfully, but these errors were encountered: