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

Hotfix user not returning list #139

Merged
merged 4 commits into from
Oct 3, 2023
Merged

Conversation

DavidFair
Copy link
Collaborator

Description:

Fixes UserRunner not returning a list, this was seen by @meoflynn

Special Notes:


Submitter:

Have you (where applicable):

  • Added unit tests?
  • Checked the latest commit runs on Dev?
  • Updated the example config file(s) and README?

Reviewer

Does this PR:

  • Place non-StackStorm code into the lib directory?
  • Have unit tests for the action/sensor and lib layers?
  • Have clear and obvious action parameter names and descriptions?

@DavidFair DavidFair added the bug Something isn't working label Oct 2, 2023
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e11ff2a) 97.48% compared to head (ae18e2d) 97.61%.
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
+ Coverage   97.48%   97.61%   +0.12%     
==========================================
  Files         174      174              
  Lines        7011     7048      +37     
  Branches      436      438       +2     
==========================================
+ Hits         6835     6880      +45     
+ Misses        145      137       -8     
  Partials       31       31              
Files Coverage Δ
lib/openstack_query/queries/user_query.py 93.33% <ø> (ø)
lib/openstack_query/runners/user_runner.py 93.61% <100.00%> (+0.59%) ⬆️
...uery/handlers/test_client_side_handler_datetime.py 100.00% <100.00%> (ø)
...ts/lib/openstack_query/runners/test_user_runner.py 100.00% <100.00%> (ø)
...query/handlers/test_client_side_handler_generic.py 96.00% <95.45%> (ø)
...query/handlers/test_client_side_handler_integer.py 95.45% <95.00%> (ø)

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@anish-mudaraddi anish-mudaraddi left a comment

Choose a reason for hiding this comment

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

rewrite your tests once #141 is merged

anish-mudaraddi and others added 2 commits October 2, 2023 16:59
add a workaround to allow querying by id using conn.identity.find_user
This resolves an issue where the calling method expects a list back, but
instead gets a singular value
@DavidFair DavidFair force-pushed the hotfix_user_not_returning_list branch from 6850e74 to f6a26bd Compare October 2, 2023 16:01
lib/openstack_query/queries/user_query.py Show resolved Hide resolved
lib/openstack_query/runners/user_runner.py Outdated Show resolved Hide resolved
Fixes a bug where we are passing the string 'id' rather than a real ID
that was selected
Fixes some doc-strings which refer to servers when we are in a user
query instead
Copy link
Collaborator

@anish-mudaraddi anish-mudaraddi left a comment

Choose a reason for hiding this comment

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

LGTM

@anish-mudaraddi anish-mudaraddi merged commit 035e383 into main Oct 3, 2023
@anish-mudaraddi anish-mudaraddi deleted the hotfix_user_not_returning_list branch October 3, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants