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

Database: project reference model #1328

Closed
5 of 7 tasks
Tracked by #1848
lachmanfrantisek opened this issue Jan 19, 2022 · 4 comments · Fixed by #2065 or #2070
Closed
5 of 7 tasks
Tracked by #1848

Database: project reference model #1328

lachmanfrantisek opened this issue Jan 19, 2022 · 4 comments · Fixed by #2065 or #2070
Assignees
Labels
area/database Related to the Packit's database area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/high This issue impacts multiple/lot of users. kind/refactor Technical debt - the code needs love.

Comments

@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Jan 19, 2022

Follow-up for: packit/research#128

The current situation with project/trigger/commit-related models:

  • Project for trigger not effective to get for multiple entries.
  • JobTriggerModel is more a git reference than a trigger.
  • Commit is spread across the models (in build/test models and release).

Let's transform JobTriggerModel into something better-named and better-connected. We would like to use it as a project/git reference.

  • @lachmanfrantisek promise to explain this task and showcase it via the diagram
  • Pick a better name for JobTriggerModel (something like ProjectReference or CommitModel).
  • Add a new column for commit hash (e.g. commit/commit_hash/ commit_sha).
  • Connect the model directly to the ProjectModel. Each commit occurrence (e.g. pr x branch push) will have a different model -- so, no change in the behaviour...;)
    • With this, we can simplify a lot of queries that try to get a project model throught the pr/branch/release/issue model. Either fix it (if you think it's simple) or create a follow-up card to do it.
  • Create migration steps that add the newly introduced connections/values also for the already present data.
  • Regenerate the database diagram
@lachmanfrantisek lachmanfrantisek added kind/refactor Technical debt - the code needs love. area/database Related to the Packit's database labels Jan 19, 2022
@lachmanfrantisek lachmanfrantisek changed the title database: project reference model Database: project reference model Jan 19, 2022
@stale

This comment was marked as off-topic.

@stale stale bot added the stale Is the issue still valid? label Apr 16, 2022
@stale stale bot closed this as completed Apr 30, 2022
@TomasTomecek TomasTomecek removed the stale Is the issue still valid? label Jun 1, 2022
@TomasTomecek TomasTomecek reopened this Jun 1, 2022
@stale

This comment was marked as resolved.

@stale stale bot added the stale Is the issue still valid? label Sep 21, 2022
@lachmanfrantisek lachmanfrantisek removed the stale Is the issue still valid? label Sep 22, 2022
@TomasTomecek TomasTomecek added complexity/single-task Regular task, should be done within days. impact/high This issue impacts multiple/lot of users. area/general Related to whole service, not a specific part/integration. gain/high This brings a lot of value to (not strictly a lot of) users. labels Apr 13, 2023
@majamassarini majamassarini self-assigned this May 9, 2023
This was referenced May 24, 2023
softwarefactory-project-zuul bot added a commit that referenced this issue May 31, 2023
Fix/packit service/1328

Fixes #1328 (point 2)

RELEASE NOTES BEGIN
RELEASE NOTES END

Reviewed-by: František Lachman
Reviewed-by: Jiri Popelka
Reviewed-by: Maja Massarini
@majamassarini
Copy link
Member

I re-open it, since just one step has been done.

@majamassarini majamassarini reopened this May 31, 2023
@majamassarini majamassarini added the blocked We are blocked! label Jun 5, 2023
@majamassarini
Copy link
Member

Step 2) blocked waiting for feedback on #2070
Step 3) I prefer not to duplicate data, I re-searched the possibility of using views here

@majamassarini majamassarini removed the blocked We are blocked! label Jun 26, 2023
softwarefactory-project-zuul bot added a commit that referenced this issue Aug 8, 2023
Fix/packit service/1328 bis

Fixes #1328 (point 3)
The new db diagram:

Reviewed-by: Maja Massarini
Reviewed-by: Laura Barcziová
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database Related to the Packit's database area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/high This issue impacts multiple/lot of users. kind/refactor Technical debt - the code needs love.
Projects
Archived in project
3 participants