-
Notifications
You must be signed in to change notification settings - Fork 140
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
Run config validation test in a different directory than the repo, fix bugs found when making the change #827
Run config validation test in a different directory than the repo, fix bugs found when making the change #827
Conversation
Shellcheck pushed me to moved from `grep ... | wc -l` to `grep -c ...`, which did not work when trying to save the value to a variable in a subshell. Instead, I switched to using `grep -q ...` directly in the conditional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very significant improvement in the code and its technical debt. Please address the minor regex change and concern about the unit tests.
Additionally, I suggest renaming output.tf
to outputs.tf
to comply with standard module structure.
Once you make these changes, do you believe we should run all optional PR checks or ought they be unaffected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see some of my comments here. I have not reviewed the go code, but I trust Tom went through it in detail.
The bulk of the changes to Go code are cosmetic due to the improved dependency structure. That said, there is some real action in |
I have integration tests running for another PR (#832), I will kick them off for this PR when they finish |
Discussed at standup, it's good to merge
Description
This goal of this PR was to run the
validate_configs.sh
validation outside of the HPC Toolkit repo. Doing so exposed a bug with the packer modulereader package where the packerreader attempts to copy files by default, without checking if the source is local vs embedded.The fix to this is included as well to ensure tests are passing again. Some refactoring took place as well with the sourcereader and modulereader. It became difficult to avoid cyclical dependencies, so I instead moved some functionality out of sourcereader and into modulereader where it belongs, and now use sourcereader more actively when copying a module from various sources to the file system.
There is still work to do to improve these modules (e.g. function names need to improve), but I tried to keep it limited to what was needed to reasonably get tests passing again without adding additional tech debt.
Changes made
Testing
make tests
now also builds and installs the binaryRefactor
Submission Checklist
pre-commit install
)make tests
)