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

fix default argument handling in rake artifact task #13904

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

jsvd
Copy link
Member

@jsvd jsvd commented Mar 17, 2022

Ruby allows methods to have default values in arguments if they're not
passed. However if a nil is passed then the default value isn't used.

The artifact:archives tasks were passing nil values to the exclusion
argument, causing all files to be included in the package.

This commit cleans the naming of the path lists and ensures the default
exclusion list is always used.

To test this the reviewer can run rake artifact:archives and then confirm that the produced archives don't include files such as "bin/bundle" or in the case of OSS archives, the "x-pack" folder.

@jsvd
Copy link
Member Author

jsvd commented Mar 17, 2022

jenkins test this please

Copy link
Contributor

@kares kares left a comment

Choose a reason for hiding this comment

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

🥇 checked generated artifacts before/after and can confirm bin/bundle was and is no longer included in any of the (.zip/.gz) artifacts.

CI failures seem unrelated (one timeout second intermittent stats API returning no response)

@jsvd jsvd force-pushed the fix_file_exclusion_rake_archives branch from 5825f25 to 0439611 Compare March 18, 2022 10:43
Ruby allows methods to have default values in arguments if they're not
passed. However if a nil is passed then the default value isn't used.

The artifact:archives tasks were passing nil values to the exclusion
argument, causing all files to be included in the package.

This commit cleans the naming of the path lists and ensures the default
exclusion list is always used.
@jsvd jsvd force-pushed the fix_file_exclusion_rake_archives branch from 0439611 to 785a0c6 Compare March 18, 2022 10:45
@jsvd jsvd merged commit 1195b38 into elastic:main Mar 18, 2022
@jsvd jsvd deleted the fix_file_exclusion_rake_archives branch March 18, 2022 10:46
@jsvd
Copy link
Member Author

jsvd commented Mar 18, 2022

@logstashmachine backport 8.1

jsvd added a commit that referenced this pull request Mar 18, 2022
Ruby allows methods to have default values in arguments if they're not
passed. However if a nil is passed then the default value isn't used.

The artifact:archives tasks were passing nil values to the exclusion
argument, causing all files to be included in the package.

This commit cleans the naming of the path lists and ensures the default
exclusion list is always used.
jsvd added a commit that referenced this pull request Mar 18, 2022
Ruby allows methods to have default values in arguments if they're not
passed. However if a nil is passed then the default value isn't used.

The artifact:archives tasks were passing nil values to the exclusion
argument, causing all files to be included in the package.

This commit cleans the naming of the path lists and ensures the default
exclusion list is always used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants