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

Stop using private classes and the anchor pattern #709

Closed
ghoneycutt opened this issue Jul 6, 2017 · 7 comments
Closed

Stop using private classes and the anchor pattern #709

ghoneycutt opened this issue Jul 6, 2017 · 7 comments
Assignees

Comments

@ghoneycutt
Copy link
Collaborator

The anchor pattern is deprecated. Currently we have private classes that manage pieces of the whole but do not provide value on their own. Would prefer to have fewer classes and no longer need the anchor pattern or private classes.

@ghoneycutt
Copy link
Collaborator Author

This will restructure the module enough such that existing PR's will not merge. This work should not happen until the open PR's have been closed.

@alvagante
Copy link
Collaborator

@ghoneycutt This also might be done during #682
and actually, as you wrote, it's probably better to do this refactoring with large impact on code after current PRs are merged.

@ghoneycutt
Copy link
Collaborator Author

Yeah, let's hold off on this for now.

@alvagante
Copy link
Collaborator

@ghoneycutt I can start to work on this, based on the 682-data-types branch

@alvagante
Copy link
Collaborator

@ghoneycutt I'd start to work on this, don't know (maybe haven't to privileges) how to label the ticket or self assign.

@alvagante
Copy link
Collaborator

alvagante commented Jul 20, 2017

Works here: #763 not ready to be merged yet

alvagante added a commit to alvagante/sensu-puppet that referenced this issue Jul 21, 2017
Removed anchors and create_resources

Note: an anchor in init.pp has been temporarily left in place.
It has a purpose and might not trivial to replace.
Could remain in code base as far as I'm concerned.

Syntax fix

Added forgotten defaults var in init.pp resource hashes

Fixed order in hash merging
alvagante added a commit to alvagante/sensu-puppet that referenced this issue Jul 27, 2017
alvagante added a commit to alvagante/sensu-puppet that referenced this issue Aug 14, 2017
alvagante added a commit to alvagante/sensu-puppet that referenced this issue Aug 14, 2017
alvagante added a commit to alvagante/sensu-puppet that referenced this issue Aug 14, 2017
alvagante added a commit to alvagante/sensu-puppet that referenced this issue Aug 21, 2017
Removed anchors and create_resources

Syntax fix

Added forgotten defaults var in init.pp resource hashes

Fixed order in hash merging

Remove check for private classes usage

sensu::enterpise::dashboard class consolidation sensu#709

Removed subclasses incorporated in sensu::enterprise::dashboard

Fixed sensu::check notify tests

Fixed sensu::check notify tests
alvagante added a commit to alvagante/sensu-puppet that referenced this issue Aug 21, 2017
Removed anchors and create_resources

Syntax fix

Added forgotten defaults var in init.pp resource hashes

Fixed order in hash merging

Remove check for private classes usage

sensu::enterpise::dashboard class consolidation sensu#709

Removed subclasses incorporated in sensu::enterprise::dashboard

Fixed sensu::check notify tests

Removed manifests readded by merge
alvagante added a commit to alvagante/sensu-puppet that referenced this issue Aug 21, 2017
Removed anchors and create_resources

Syntax fix

Added forgotten defaults var in init.pp resource hashes

Fixed order in hash merging

Remove check for private classes usage

sensu::enterpise::dashboard class consolidation sensu#709

Removed subclasses incorporated in sensu::enterprise::dashboard

Fixed sensu::check notify tests

Removed manifests readded by merge

Workaround for Puppet 4.x compatibilty
  - Evaluation Error: Error while evaluating a Resource Statement, Sensu::Write_json[/etc/sensu/conf.d/checks/mycheck.json]: parameter 'notify_list' index 0 expects a Data value, got Type at /home/travis/build/sensu/sensu-puppet/spec/fixtures/modules/sensu/manifests/check.pp:226 on node testing-docker-0c136c1e-7d4c-4d32-9c4c-37325d83735a.ec2.internal
ghoneycutt added a commit that referenced this issue Aug 24, 2017
#709 Remove anchors (and create_resources)
@alvagante
Copy link
Collaborator

Relevant PR #763 merged. Closing issue.

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

No branches or pull requests

2 participants