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

Gateway: add api user/projects #316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alessandro-sorint
Copy link
Contributor

fix #286

@sgotti
Copy link
Member

sgotti commented Feb 24, 2022

@alessandro-sorint Thanks for the PR.

I think this should be put on hold since:

  • it'll conflict with my work on gateway: make runs api related to project/user #310 . I'm going to remove the RunID and access run by project/user and the pagination is done on run counter which is per project. There'll be no more a global runid exposed by the gateway apis. You shoud use a continuation token to paginate between multiple run groups.
  • It requires more reasoning. What is a user run? A user direct run? All the runs inside all user projects?
  • I'm not sure why this api is really needed. What's the purpose of this? Won't this work only for user projects? If the requirement is to get all the runs created by an user (inside an org, a PR to an org project) this won't work. Please add more details on what you want to achieve inside the issue Add ability the to user to see all the current running run #286 you opened.

Additionally:

  • It implements two different apis so two PR should be created (but is the second api really needed?)

@alessandro-sorint
Copy link
Contributor Author

@alessandro-sorint Thanks for the PR.

I think this should be put on hold since:

  • it'll conflict with my work on gateway: make runs api related to project/user #310 . I'm going to remove the RunID and access run by project/user and the pagination is done on run counter which is per project. There'll be no more a global runid exposed by the gateway apis. You shoud use a continuation token to paginate between multiple run groups.
  • It requires more reasoning. What is a user run? A user direct run? All the runs inside all user projects?
  • I'm not sure why this api is really needed. What's the purpose of this? Won't this work only for user projects? If the requirement is to get all the runs created by an user (inside an org, a PR to an org project) this won't work. Please add more details on what you want to achieve inside the issue Add ability the to user to see all the current running run #286 you opened.

Additionally:

  • It implements two different apis so two PR should be created (but is the second api really needed?)

@sgotti I are implementing a new api because I need to get all runs running(that the user/admin can see) from all progectgroups(organizations project, user project and directrun).
At the moment the gateway api /runs need to specify the gruop value from the client, but I would like to avoid to specify them; I get the message "no groups specified" if I not specify it.
Do you think there is another way to get all runs running without specify the group from the client?

A "user run" is a run visible from the user, it can be a user/organization project or directrun, so with this api I can get all runs visible from the user.

@sgotti
Copy link
Member

sgotti commented Feb 24, 2022

@sgotti I are implementing a new api because I need to get all runs running(that the user/admin can see) from all progectgroups(organizations project, user project and directrun).

Let's wait when #310 is implemented and then we can think about this use case.

At the moment the gateway api /runs need to specify the gruop value from the client, but I would like to avoid to specify them; I get the message "no groups specified" if I not specify it.

Don't use it since it will be removed in #310

Do you think there is another way to get all runs running without specify the group from the client?

A "user run" is a run visible from the user, it can be a user/organization project or directrun, so with this api I can get all runs visible from the user.

@alessandro-sorint alessandro-sorint changed the title Gateway: add api user/runs and user/projectgroups Gateway: add api user/projects Apr 4, 2022
@alessandro-sorint
Copy link
Contributor Author

alessandro-sorint commented Apr 5, 2022

Hi @sgotti I added a new api /user/projects it returns all the projects that the user can see.
The front-end can use this api and next call the backend to get the running runs of the projects.
For the front-end must I open an Issue in agola-web to add this functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability the to user to see all the current running run
2 participants