dataiku / dataiku/dataiku-api-client-python

Client list users method have attribute wrongly spell

Open
#282 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
44
Forks
29
Avg merge
3h 34m
Merged PRs (30d)
2

Description

See I wanted to know all the users which are currently active.
Problem with the current code is, list_users() returns list of dictionary. And each dictionary has attribute activeWebSocketSesssions, ideally this should be activeWebSocketSessions.

Note - I wanted to make that change using the pull request, but I did not find this attribute in the current codebase, may be because you guys did not revel it, may be not. Aways this is my finding, that will help make this product a bit better.

    def list_active_users(self):
        """
        Get all the active users who currently login to the DSS

        This method takes nothing and returns name of the users who are actively working now

        Returns:
        string: calculate all currently active users
        """
        user_list = []
        dss_users = self.client.list_users()
        for user in dss_users:
            if user["activeWebSocketSesssions"] != 0:
                user_list.append(user["displayName"])
                
        return user_list

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the list_users() API client entry point and inspect the returned user dictionaries for the spelling of the active WebSocket session attribute. Done means the returned key uses activeWebSocketSessions consistently and the shown list_active_users() usage can identify active users without relying on the misspelled key.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.