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

Add Contexts API #497

Open
NivLipetz opened this issue Oct 17, 2020 · 7 comments
Open

Add Contexts API #497

NivLipetz opened this issue Oct 17, 2020 · 7 comments
Assignees
Labels

Comments

@NivLipetz
Copy link
Member

NivLipetz commented Oct 17, 2020

Is your feature request related to a problem? Please describe.
Predator is missing the functionality of grouping resources (tests/reports/jobs) to different contexts (teams, users, organizations, etc).

Describe the solution you'd like
In order to add this desired groupings so it's easier to filter and divide the resources into more relevant subgroups, a new resource context needs to be defined.

  1. Define new contexts API
    • POST /v1/contexts
    • GET /v1/contexts
    • DELETE /v1/contexts/{contextID}
  2. Context should be a simple list of values saved in the db (create new contexts table) with the following fields:
id: STRING (primary key - string)
name: STRING
  1. Limitations: name and id should be unique => can't create a context with the same name of one that's already created (return 400 BAD_REQUEST in this case).

Additional context
Use the following file structure as a guide on how to create this new API and resource in Predator's architecture:
https://github.com/Zooz/predator/blob/master/CONTRIBUTING.md#system-resource-folder-structure

@sprakash57
Copy link

May i take this up?

@NivLipetz
Copy link
Member Author

Hi @sprakash57 that would be great! We are available on our slack workspace for any questions.

@sprakash57
Copy link

Sure.

@sprakash57
Copy link

@NivLipetz I saw @tomcorey26 already raised a PR against it. Let me know if it needs additional work.

@NivLipetz
Copy link
Member Author

Hi @sprakash57 I see that someone raised a PR against this issue already although it was assigned to you.. Sorry about that.

Moving forward, if you like there's an open issue that integrates this context_id to all of the other relevant Predator resources (tests, jobs, reports, etc). It's an issue with the same amount of code needed to be complete as this one. Take a look maybe you will find it suiting 😄 #495

@NivLipetz NivLipetz assigned NivLipetz and unassigned sprakash57 Oct 18, 2020
@sprakash57
Copy link

@NivLipetz can you assign #495 to me?

@NivLipetz
Copy link
Member Author

@sprakash57 can you please request on the issue itself? won't let me assign you otherwise

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