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

Fix optional_claims handling for azure_rm_adapplication #1480

Merged
merged 33 commits into from
May 21, 2024

Conversation

kent007
Copy link
Contributor

@kent007 kent007 commented Mar 5, 2024

SUMMARY
Fixes #1475

ISSUE TYPE
Bugfix Pull Request

COMPONENT NAME
azure_rm_adapplication

ADDITIONAL INFORMATION
I copied the format already present for manipulating other complex fields. Conceivably this could be divided into 3 module level args instead of a single complex arg, but I don't see any direct benefit for doing so. Tests seem to work okay against my azure instance.

Previously filed in #1479 and #1476, closed those while I was reworking branches on my fork

@Fred-sun Fred-sun added medium_priority Medium priority new_feature New feature requirments work in In trying to solve, or in working with contributors enhancement New feature or request labels Mar 6, 2024
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

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

ERROR: plugins/modules/azure_rm_adapplication.py:171:111: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:179:118: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:198:116: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:203:111: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:211:112: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:230:116: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:235:118: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:243:112: W291: trailing whitespace

plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

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

line 172,180,199,204,212,231,236,244

plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
@Fred-sun
Copy link
Collaborator

@kent007 Please remove trailing space

ERROR: plugins/modules/azure_rm_adapplication.py:171:111: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:179:118: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:198:116: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:203:111: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:211:112: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:230:116: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:235:118: W291: trailing whitespace
ERROR: plugins/modules/azure_rm_adapplication.py:243:112: W291: trailing whitespace

Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

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

Define errors!

plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
kent007 and others added 2 commits March 19, 2024 09:18
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
kent007 and others added 6 commits March 20, 2024 09:09
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
kent007 and others added 8 commits March 20, 2024 09:10
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
# Conflicts:
#	plugins/modules/azure_rm_adapplication.py
@kent007
Copy link
Contributor Author

kent007 commented Mar 20, 2024

After merging all suggested changes and resolving merge conflicts, I still see the following pep8 errors from sanity testing:

ERROR: Found 3 pep8 issue(s) which need to be resolved:
ERROR: plugins/modules/azure_rm_adapplication.py:171:161: E501: line too long (191 > 160 characters)
ERROR: plugins/modules/azure_rm_adapplication.py:200:161: E501: line too long (191 > 160 characters)
ERROR: plugins/modules/azure_rm_adapplication.py:229:161: E501: line too long (191 > 160 characters)

Should we address these?

@Fred-sun
Copy link
Collaborator

@kent007 Yes, changes are required, documentation must be pep8 compliant! Thank you!

plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
@Fred-sun
Copy link
Collaborator

Fred-sun commented Mar 22, 2024

@kent007 I most made some changes to this PR(kent007#1) and submit your repo which you can merge into your branch 'dev-application'. The changes are as follows:

  1. The parameters of the test cases using the wrong - tests/integration/the targets/azure_rm_adapplication/tasks/main yml
  2. Add the return value 'optional_claims' to azure_rm_adapplication_info.py
  3. Change the type of parameter additional_properties in azure_rm_adapplication.py to list

Add 'optional_claims' to the return value of azure_rm_adapplication
@kent007
Copy link
Contributor Author

kent007 commented Mar 22, 2024

@kent007 I most made some changes to this PR(kent007#1) and submit your repo which you can merge into your branch 'dev-application'. The changes are as follows:

  1. The parameters of the test cases using the wrong - tests/integration/the targets/azure_rm_adapplication/tasks/main yml
  2. Add the return value 'optional_claims' to azure_rm_adapplication_info.py
  3. Change the type of parameter additional_properties in azure_rm_adapplication.py to list

I see, thank you! Merged

Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

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

A small error, return value duplicate, please delete. Thank you!

plugins/modules/azure_rm_adapplication.py Outdated Show resolved Hide resolved
@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Mar 26, 2024
@xuzhang3 xuzhang3 merged commit e8ce7e1 into ansible-collections:dev May 21, 2024
Justwmz pushed a commit to Justwmz/azure that referenced this pull request Nov 4, 2024
…ections#1480)

* Fix: parse paginated replies for users and groups

* Fix: await

* wrong var return

* Fix: optional claims for applications

* Chore: correct documentation

* Fix: check for optional_claims being None

* Address PR feedback

* Revert "Address PR feedback"

This reverts commit a1ec38a.

* Address PR feedback

* Fix: line endings

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Fix: more doc formatting

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Update plugins/modules/azure_rm_adapplication.py

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* add `_claims` suffix to all three new parameters

* Apply suggestions from code review

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

* Add 'optional_claims' to the return value of azure_rm_adapplication

* Modify 'additional_properties' type to 'list'

* remove duplicate keys

---------

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <xiuxi.sun@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium_priority Medium priority new_feature New feature requirments ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azure_rm_adapplication does not properly manipulate optional_claims
3 participants