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

[COOK-3418] Virtual Domain Support PR #37

Closed
wants to merge 2 commits into from
Closed

[COOK-3418] Virtual Domain Support PR #37

wants to merge 2 commits into from

Conversation

bradenwright
Copy link

http://tickets.opscode.com/browse/COOK-3418

I resolved the merge conflicts on #15 and would like to get it merged.

Thanks to jdamick for his work

@jesseadams
Copy link

@bradenwright - Please see the comments in the ticket: https://tickets.opscode.com/browse/COOK-3418

@bradenwright
Copy link
Author

Sorry I thought I had replied on the ticket.

I did see the comments and I would still like to get this merged in. I started working on the refactor but didn't have time to finish.... I should have time this weekend, if not earlier

@allaire
Copy link

allaire commented Sep 15, 2013

👍 Currently I duplicated most of the work in this commit in my own fork's branch. @bradenwright tell me if you're too busy for the refactor, I could do it 🍺

@@ -66,3 +66,9 @@ recipient_canonical_maps = <%= node['postfix']['recipient_canonical_maps'] %>
<% unless node['postfix']['canonical_maps'].nil? -%>
canonical_maps = <%= node['postfix']['canonical_maps'] %>
<% end -%>

<% if !node['postfix']['virtual_domains'].empty? -%>
Copy link

Choose a reason for hiding this comment

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

I think it would be better to separate this condition, thoughts?

<% if !node['postfix']['virtual_domains'].empty? -%>
virtual_alias_domains = <%= node['postfix']['virtual_domains'].join(' ') %>
<% end -%>

<% if !node['postfix']['virtual_aliases'].empty? -%>
virtual_alias_maps = hash:/etc/postfix/virtual
<% end -%>

@bradenwright
Copy link
Author

I completely agree that separating them would be better and will do so!

I've got time tonight and think I should be able to get it finished and committed up but if there is anything in your you prefer in your code, etc I'm open (or if you've already refactored I'd check out your branch and double check it works for me). Anyways let me know what you think.

@allaire
Copy link

allaire commented Sep 16, 2013

@bradenwright Go ahead! 🍺

@bradenwright
Copy link
Author

Alright so should be all set... I did rename/change the attributes to follow along with the new 3.0.1 format (so I didn't have to change the main.cf template).

default['postfix']['main']['virtual_alias_domains'] = "" \
unless node['postfix']['virtual']['virtual_aliases'].empty?
default['postfix']['main']['virtual_alias_maps'] = 'hash:/etc/postfix/virtual' \
unless node['postfix']['virtual']['virtual_aliases'].empty?
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we refactor this to something like:

default['postfix']['virtual']['virtual_aliases'] = {} 
unless node['postfix']['virtual']['virtual_aliases'].empty?
  default['postfix']['main']['virtual_alias_domains'] = "" 
  default['postfix']['main']['virtual_alias_maps']    = 'hash:/etc/postfix/virtual' 
end

@sethvargo
Copy link
Contributor

@bradenwright there are some inline comments; could you please take a look? Don't forget to mark the JIRA ticket as "Fix Provided" after you're done.

@1ed
Copy link

1ed commented Oct 14, 2013

👍

@bradenwright
Copy link
Author

Thanks Seth! Think its ready to go... sorry there was so much to clean up for such little code.

@allaire
Copy link

allaire commented Oct 22, 2013

@sethvargo We need that :)

@bradenwright
Copy link
Author

looks like it got merged into master. Thanks!

(I assume I'm supposed to close this since its merge into master and still open if not let me know and I'll reopen it)

@bradenwright
Copy link
Author

I really sorry I got confused and must have been on my github... this is not merged yet

@bradenwright bradenwright reopened this Oct 24, 2013
@1ed
Copy link

1ed commented Oct 29, 2013

@bradenwright could you please mark the ticket as "Fix Provided"

@allaire
Copy link

allaire commented Nov 7, 2013

Any updates on this? I would gladly ditch my fork of this cookbook in favor of this PR :)

@bradenwright
Copy link
Author

I made the changes that @sethvargo suggested so I think its just waiting on opscode to merge it in at this point.

It should be usable (but I get if want it to be merged into master before using it).

@allaire
Copy link

allaire commented Nov 7, 2013

@bradenwright You should rebase/squash your 6 commits into 1, I'm sure @sethvargo will ask for it :)

@bradenwright
Copy link
Author

Cool that makes total sense regardless I'll take care of that. I haven't squashed before but I've rebased, I'm sure its not very hard. I should have time to do it tonight or tomorrow (for sure this weekend).

@allaire
Copy link

allaire commented Nov 8, 2013

@bradenwright git rebase -i HEAD~6 (where 6 is the number of commits) then git push --force

@bradenwright
Copy link
Author

I got it all put into 1 commit but....

either I executed the rebase wrong or I couldn't figure out a great way to do it since there were other commits in between my 6 commits. I decided to grab the latest from postfix and cherry-pick what I needed and merge it onto latest master from postfix (since its only 4 files), then push force. But ultimately I accomplished what you suggested which is getting all my code into 1 commit.

Thanks again for the suggestion... I'll definitely start to use squashing commits in my everyday workflow ;)

@someara
Copy link

someara commented Jun 11, 2014

merged in d6bec0d

@someara someara closed this Jun 11, 2014
@bradenwright
Copy link
Author

@someara FYI just wanted to let you know that looks like this essentially got added 2x #55 is doing the same thing and got merged as well. (Look at recipes virtual and virtual_aliases)

#55 looked to have more logic in the attributes so probably makes sense to back out this change and leave #55 (either way 1 of them should be backed out).

@someara
Copy link

someara commented Jun 11, 2014

reverted. thanks!
-s

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.

6 participants