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

Deprecate #getCommandParts in Ansible XxxCommand classes ⚠️ #1031

Closed
sleberknight opened this issue Aug 27, 2023 · 0 comments · Fixed by #1030
Closed

Deprecate #getCommandParts in Ansible XxxCommand classes ⚠️ #1031

sleberknight opened this issue Aug 27, 2023 · 0 comments · Fixed by #1030
Assignees
Labels
deprecation Deprecates an existing feature
Milestone

Comments

@sleberknight
Copy link
Member

In #1027 usages of the deprecated org.kiwiproject.ansible.vault.OsCommand are replaced by the new org.kiwiproject.base.process.OsCommand. But the original OsCommand defined the method getCommandParts() while the new one simplifies it to just parts(). Since the original methods were a public API, we need to deprecate those for removal, and indicate that `parts() is the replacement for them. They will be removed in the next major version, 4.0.0.

@sleberknight sleberknight added the deprecation Deprecates an existing feature label Aug 27, 2023
@sleberknight sleberknight added this to the 3.1.0 milestone Aug 27, 2023
@sleberknight sleberknight self-assigned this Aug 27, 2023
sleberknight added a commit that referenced this issue Aug 27, 2023
…1030)

* Replace all usages with org.kiwiproject.base.process.OsCommand
* Refactor existing AnsibleXxxCommand classes to implement
  org.kiwiproject.base.process.OsCommand
* Deprecate all the #getCommandParts methods in the AnsibleXxxCommand
  classes for removal; they are replaced by #parts. But since they
  are part of the public API, we need to first deprecate them
  and then remove them in the next major version, 4.0.0
* Update tests to use #parts method instead of #getCommandParts, but
  also add assertions that still test the old methods (and suppress
  the warnings about usages of code that is deprecated for removal)

Closes #1027
Closes #1031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecates an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant