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

Scope pipelines to orgs #166

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Conversation

Zheng-Zhi-Qiang
Copy link
Collaborator

Description
In this PR, I scoped the pipelines to orgs. Following changes were made:

  • Added UserId and OrganizationId to PipelineModel
  • Updated the pipeline endpoints (GET requests now need the org_id as query param, POST requests need org_id in the request body)
  • Created a new function to retrieve all pipelines by OrganizationId
  • Updated handler functions to retrieve orgId/userId when required
  • Updated mongo seed to reflect changes

NOTE: @Ziyang-98 @joshtyf merging this PR before frontend makes any changes to accommodate the backend changes will likely break something in the frontend, especially because now pipelines are specific to Orgs, not sure if frontend is ready for that yet. If we don't have that ready for this change and we don't plan to do so before release, hold the merge for this.

@Zheng-Zhi-Qiang Zheng-Zhi-Qiang added backend Backend related refactor Code refactor or updates labels May 28, 2024
@Zheng-Zhi-Qiang Zheng-Zhi-Qiang self-assigned this May 28, 2024
@Zheng-Zhi-Qiang Zheng-Zhi-Qiang changed the title Scope pipelines to org and user Scope pipelines to orgs May 28, 2024
@Ziyang-98
Copy link
Collaborator

Can merge first, then fix the pipeline request functions in the FE (shouldn't be much changes since its just adding org_id to query params). But do let us know when its merged so we can expect it to fail.

Copy link
Owner

@joshtyf joshtyf left a comment

Choose a reason for hiding this comment

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

LGTM

@Ziyang-98 Ziyang-98 merged commit d06b39f into main Jun 6, 2024
2 checks passed
@Zheng-Zhi-Qiang Zheng-Zhi-Qiang deleted the refactor/scope-pipelines-to-org-and-user branch June 6, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related refactor Code refactor or updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants