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

Azure Snapshot Repository #1087

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

jtbrush56
Copy link

@jtbrush56 jtbrush56 commented Jun 2, 2020

Pull request acceptance prerequisites:

  • Signed the CLA (if not already signed)
  • Rebased/up-to-date with base branch
  • Tests pass
  • Updated CHANGELOG.md with patch notes (if necessary)
  • Updated CONTRIBUTORS (if attribution is requested)

@elasticmachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@fatmcgav
Copy link
Contributor

fatmcgav commented Jun 8, 2020

Jenkins test this please

Copy link
Contributor

@fatmcgav fatmcgav left a comment

Choose a reason for hiding this comment

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

@jtbrush56 Thank you for taking the time to make these additions.

A few comments that need addressing.
I'd also like to see the new properites added to the unit tests.[1][2]

Also, could you add an example to the README.md[3]

[1] https://github.com/elastic/puppet-elasticsearch/blob/master/spec/unit/type/elasticsearch_snapshot_repository_spec.rb
[2] https://github.com/elastic/puppet-elasticsearch/blob/master/spec/unit/provider/elasticsearch_snapshot_repository/ruby_spec.rb
[3] https://github.com/elastic/puppet-elasticsearch#snapshot-repositories

:base_path => api_object['settings']['base_path'],
:client => api_object['settings']['client'],
:readonly => api_object['settigns']['readonly'],
:location_mode => api_object['settings']['location_mode'],
Copy link
Contributor

Choose a reason for hiding this comment

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

These new fields will need to be added as optional fields on the generate_body method below.

@@ -32,6 +32,30 @@
newproperty(:location) do
desc 'Repository location'
end

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like rubocop is complaining about trailing whitespace here.

end

newproperty(:container) do
defaultto 'elasticsearch-snapshots'
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should set a default value for this field. Instead it should be a conscious decision by the user as to what they want to call their Azure container.

@@ -37,7 +37,22 @@
# Snapshot repository type.
#
# @param location
# Location of snapshots. Mandatory
# Location of snapshots.
Copy link
Contributor

Choose a reason for hiding this comment

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

This field is still mandatory when type => "fs", so we should state that.

Enum['absent', 'present'] $ensure = 'present',
Optional[String] $client = undef,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you sort out the alignment on these lines? Should all align on =.

@fatmcgav fatmcgav self-assigned this Jun 8, 2020
@jtbrush56
Copy link
Author

updated with requested changes.

Copy link
Contributor

@fatmcgav fatmcgav left a comment

Choose a reason for hiding this comment

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

It looks like rubocop is still complaining about trailing whitespace on https://github.com/elastic/puppet-elasticsearch/pull/1087/files#diff-9240f318e7e1ac50308c77dfa32622ddR49-R54

You should be able to test rubocop locally by running bundle exec rake rubocop.

@vox-pupuli-tasks
Copy link

Dear @jtbrush56, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs?
If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com.
You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@vox-pupuli-tasks
Copy link

Dear @jtbrush56, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

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