Skip to content

Conversation

@Fdall
Copy link
Contributor

@Fdall Fdall commented Nov 12, 2025

…e/plugins/<plugin id> folder before unpacking a plugin
@Fdall Fdall requested a review from amousset November 12, 2025 18:36
…er/share/plugins/<plugin id> folder before unpacking a plugin

Fixes #27873: Rudder package should always clean the /opt/rudder/share/plugins/<plugin id> folder before unpacking a plugin
@Fdall
Copy link
Contributor Author

Fdall commented Nov 13, 2025

PR updated with a new commit


fn get_default_package_scripts_extract_folder(&self) -> Result<PathBuf> {
let safe_name_pattern = Regex::new(r"^[a-zA-Z0-9\-_]+$")?;
if safe_name_pattern.is_match(&self.metadata.name) {
Copy link
Member

Choose a reason for hiding this comment

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

we should probably ensure safe names in the metadata constructors, likely with a dedicated type enforcing these constraints

Copy link
Member

Choose a reason for hiding this comment

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

A bit like we do for Condition in rudderc (with only a stirng inside obviously), with specific Deserializer


if is_upgrade {
// First uninstall old version, but without running prerm/portrm scripts
db.uninstall(&self.metadata.name, false, webapp)?;
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't the cleanup be done by the uninstall step instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants