Refactor patch application #12

Merged
merged 5 commits into from Jun 1, 2016

Conversation

Projects
None yet
2 participants
Owner

johnsca commented May 26, 2016

Rename all patches to match Jira ticket, and use ticket ordering to apply patches in order to reduce redundant code.

Member

kwmonroe commented May 26, 2016

This LGTM in general, but want to run it through the paces to make sure patch order isn't important. I'm fairly sure the patches don't overlap, but let's be thorough.

Owner

johnsca commented May 26, 2016

The patch order actually shouldn't change with this, as the Jira tickets were created in the same order as the patches and it's sorting by the Jira ticket number in the patch file name.

Owner

johnsca commented May 26, 2016

The render_site_yaml code should be updated to the parameter keys, though giving the fully-qualified versions does seem to still work.

Edit: Updated

Owner

johnsca commented May 26, 2016

Also, I don't think these changes warrant updating the charms or bundles; they can wait until the current PR is accepted or another necessary change comes in.

lib/charms/layer/apache_bigtop_base.py
- # apply configurable spark logs patch
- utils.run_as('root', 'patch', '-p1', '-s', '-i', spark_logs_patch)
+ charm_dir = Path(hookenv.charm_dir())
+ for patch in sorted(glob('resources/*')):
@kwmonroe

kwmonroe Jun 1, 2016

Member

Let's glob resources/*.patch instead of just *. I would feel better in case we put resources in there that aren't patches.

@kwmonroe kwmonroe merged commit 58b2785 into master Jun 1, 2016

@kwmonroe kwmonroe deleted the patch-refactor branch Jun 1, 2016

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