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

Add a scripts_data provisioning variable #9

Merged
merged 3 commits into from Jan 23, 2024

Conversation

Hyask
Copy link
Contributor

@Hyask Hyask commented Jan 17, 2024

This is part of the effort to implement an ignore list for the /var/crash test. We need to be able to define the list of ignored crashes in each profile, so that means the scripts must have access to some data defined in the profile.

This PR proposes a simple mechanism to implement that: introduce a scripts_data variable, that can contain any data structure, and will be pushed to the testbed as JSON under the name scripts_data.json, so its easy for any language to parse that file and access some data.

Also, part of that work made me realize some inconsistencies and quirks in the code, which are what the two extra commits are for.
NOTE: as one of the commits renames a variable defined in the profiles, this PR needs to merge at the same time as this MP

Before this patch, everything was handled as though we had two very
separate and distinct folders for pre_scripts and post_scripts. However,
in the profile configuration, there is only one `script_location`
variable, that was later passed to both handlers for pre/post scripts,
meaning we ended with two differents folders of the very same content.
Copy link
Collaborator

@paride paride left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, +1 on these changes. Not merging for now: as noted this needs coordination with other changes.

@paride paride merged commit 278d044 into canonical:main Jan 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants