-
Notifications
You must be signed in to change notification settings - Fork 133
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
fix: kustomize plugin fails with deprecation warnings #728
fix: kustomize plugin fails with deprecation warnings #728
Conversation
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 5m 36s |
64fe1e3
to
8b43cdf
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 51s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add changelog fragment please?
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 52s |
@gravesm I have already added the changelog fragment. please review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog fragment is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
0f0fc84
to
c1a884e
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 36s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have some spacing and indentation issues that are causing linters to fail. I think the one integration test failure should be solved by rebasing.
plugins/lookup/kustomize.py
Outdated
@@ -94,7 +94,8 @@ def get_binary_from_path(name, opt_dirs=None): | |||
|
|||
def run_command(command): | |||
cmd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |||
return cmd.communicate() | |||
stdout, stderr = cmd.communicate() | |||
return cmd.returncode, stdout, stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return cmd.returncode, stdout, stderr | |
return cmd.returncode, stdout, stderr |
plugins/lookup/kustomize.py
Outdated
if err: | ||
raise AnsibleLookupError( | ||
"kustomize command failed with: {0}".format(err.decode("utf-8")) | ||
"kustomize command failed. exit code: {0}, error: {1}".format(ret, err.decode("utf-8")) | ||
) | ||
else: | ||
raise AnsibleLookupError( | ||
"kustomize command failed with unknown error. exit code: {0}".format(ret) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a full indentation.
c1a884e
to
b6b9762
Compare
b6b9762
to
47f5e2a
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 41s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 37s |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 4m 31s |
5bc53db
into
ansible-collections:main
Backport to stable-3: 💚 backport PR created✅ Backport PR branch: Backported as #763 🤖 @patchback |
SUMMARY error judgments are based on the exit codes of command execution, where 0 represents success and non-zero represents failure. Optimize the run_command function to return a tuple like the run_command method of AnsibleModule. Fixes #639 ISSUE TYPE Bugfix Pull Request COMPONENT NAME kustomize lookup plugin ADDITIONAL INFORMATION Reviewed-by: Mike Graves <[email protected]> Reviewed-by: QCU (cherry picked from commit 5bc53db)
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #764 🤖 @patchback |
SUMMARY error judgments are based on the exit codes of command execution, where 0 represents success and non-zero represents failure. Optimize the run_command function to return a tuple like the run_command method of AnsibleModule. Fixes #639 ISSUE TYPE Bugfix Pull Request COMPONENT NAME kustomize lookup plugin ADDITIONAL INFORMATION Reviewed-by: Mike Graves <[email protected]> Reviewed-by: QCU (cherry picked from commit 5bc53db)
This is a backport of PR #728 as merged into main (5bc53db). SUMMARY error judgments are based on the exit codes of command execution, where 0 represents success and non-zero represents failure. Optimize the run_command function to return a tuple like the run_command method of AnsibleModule. Fixes #639 ISSUE TYPE Bugfix Pull Request COMPONENT NAME kustomize lookup plugin ADDITIONAL INFORMATION Reviewed-by: Mike Graves <[email protected]>
This is a backport of PR #728 as merged into main (5bc53db). SUMMARY error judgments are based on the exit codes of command execution, where 0 represents success and non-zero represents failure. Optimize the run_command function to return a tuple like the run_command method of AnsibleModule. Fixes #639 ISSUE TYPE Bugfix Pull Request COMPONENT NAME kustomize lookup plugin ADDITIONAL INFORMATION Reviewed-by: Mike Graves <[email protected]>
SUMMARY
error judgments are based on the exit codes of command execution, where 0 represents success and non-zero represents failure.
Optimize the run_command function to return a tuple like the run_command method of AnsibleModule.
Fixes #639
ISSUE TYPE
COMPONENT NAME
kustomize lookup plugin
ADDITIONAL INFORMATION