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

Remove deprecated archive::artifactory parameters #322

Conversation

alexjfisher
Copy link
Member

The following parameters were deprecated a long time ago and have now
been removed.

  • server
  • port
  • url_path

Removing them is a breaking change but hopefully most users are already
using url

@alexjfisher
Copy link
Member Author

I would like to get this in before converting the artifactory_sha1 function to the puppet 4 API. As removing the deprecated parameters is already a breaking change, the function migration will probably be too (eg. I'll probably namespace it)

@@ -43,12 +40,9 @@
# }
#
define archive::artifactory (
Pattern[/^https?:\/\//] $url,
Copy link
Member

Choose a reason for hiding this comment

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

Sounds like Stdlib::Httpurl

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@@ -9,9 +9,6 @@
# * path: fully qualified filepath for the download the file or use archive_path and only supply filename. (namevar).
# * ensure: ensure the file is present/absent.
# * url: artifactory download url filepath. NOTE: replaces server, port, url_path parameters.
Copy link
Member

Choose a reason for hiding this comment

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

Is the note still relevant? Maybe better to do that in the changelog?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@@ -71,44 +65,29 @@
fail("archive::artifactory[${name}]: \$name or \$archive_path must be an absolute path!") # lint:ignore:trailing_comma
Copy link
Member

Choose a reason for hiding this comment

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

Odd lint ignore here. Also wondering if we should move the above line to just Stdlib::Absolutepath

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried removing the lint, and puppet-lint does complain. A false positive I guess.
Maybe I should use assert_type instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've updated this code to use assert_type and Stdlib::Absolutepath

The following parameters were deprecated a long time ago and have now
been removed.

* `server`
* `port`
* `url_path`

Removing them is a breaking change but hopefully most users are already
using `url`
@alexjfisher alexjfisher force-pushed the remove_deprecated_params_from_artifactory_sha1_function branch from a36e997 to 636bb67 Compare March 12, 2018 14:22
@alexjfisher alexjfisher merged commit 0781fc1 into voxpupuli:master Mar 12, 2018
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.

2 participants