Skip to content
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

#rel() macro for relative paths in policy files #765

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

j-lanson
Copy link
Collaborator

@j-lanson j-lanson commented Jan 7, 2025

Resolves #764 .

This PR adds a macro to the policy files, namely #rel() which goes around a string and re-interprets it as a path relative to the parent of the policy file. This way, the policy file stored in ./config can refer to the other files in the folder just by name, such as org-file #rel("Orgs.kdl").

This is necessary to fix the bug encountered in #752 . Turns out, until now probably most of our docker and binary releases would not "just work" for new people.

This PR does not address providing the #rel() functionality to config files (Hipcheck.toml), doing so is a lot larger of a lift. So going forward, using the default config file will still not work out of the box, but we plan to deprecate config files soon anyway.

@alilleybrinker I would be in favor of getting this PR and #751 merged in and releasing a hipcheck-v3.9.1 so we have a working latest version prior to 3.10 release date.

@j-lanson j-lanson added type: bug Something isn't working type: enhancement New feature or request product: hc Relates to the core "hc" binary labels Jan 7, 2025
@j-lanson j-lanson added this to the 3.9.0 milestone Jan 7, 2025
@j-lanson j-lanson self-assigned this Jan 7, 2025
@mchernicoff mchernicoff merged commit 86e1faf into main Jan 7, 2025
11 checks passed
@alilleybrinker alilleybrinker deleted the jlanson/rel-pf-macro branch January 17, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: hc Relates to the core "hc" binary type: bug Something isn't working type: enhancement New feature or request
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Add pre-parse macro system to policy files and a #rel() macro
2 participants