Skip to content

Move Issue non hashed attributes to IssueLInk#2451

Merged
Archaeopteryx merged 14 commits intomozilla:masterfrom
vrigal:issuelink-in-patch-new
Oct 23, 2024
Merged

Move Issue non hashed attributes to IssueLInk#2451
Archaeopteryx merged 14 commits intomozilla:masterfrom
vrigal:issuelink-in-patch-new

Conversation

@vrigal
Copy link
Copy Markdown
Collaborator

@vrigal vrigal commented Oct 15, 2024

Closes #2448

This PR moves the following attributes from Issue model up to IssueLink:

  • new_for_revision
  • in_patch
  • line
  • nb_lines
  • char

These attributes are not in the hash payload, so they should not be on the Issue model as we want to set a unique constraint on the hash later on (see #2447 )

The API endpoints remain compatible with the previous implementation so that the bot can simply provide a list of attributes that will result in creation of Issue+IssueLink

Both load_issues command & the frontend remain working as exepcted

@vrigal vrigal force-pushed the issuelink-in-patch-new branch from b90ac6a to 7c40d1c Compare October 15, 2024 18:03
@vrigal
Copy link
Copy Markdown
Collaborator Author

vrigal commented Oct 15, 2024

Almost done, still few failures detected from tests:

FAILED (failures=1, errors=3)

@vrigal vrigal mentioned this pull request Oct 17, 2024
@vrigal vrigal force-pushed the issuelink-in-patch-new branch from 7c40d1c to 01ca29d Compare October 18, 2024 11:18
@vrigal vrigal requested review from Archaeopteryx and La0 October 18, 2024 11:19
@vrigal vrigal force-pushed the issuelink-in-patch-new branch from 01ca29d to 6094d4f Compare October 18, 2024 11:20
@vrigal vrigal marked this pull request as ready for review October 18, 2024 11:20
@La0
Copy link
Copy Markdown
Collaborator

La0 commented Oct 18, 2024

I'll check if we need to move other attributes in this PR (line positions).

@La0 La0 requested a review from marco-c October 22, 2024 10:15
@La0 La0 self-assigned this Oct 22, 2024
@La0 La0 added backend Code review backend teklia-2024 labels Oct 22, 2024
@La0 La0 force-pushed the issuelink-in-patch-new branch from 84077da to ab71047 Compare October 22, 2024 10:18
Copy link
Copy Markdown
Collaborator

@La0 La0 left a comment

Choose a reason for hiding this comment

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

I'll simply say that I'm not the best reviewer here as I contributed a good chunk of the code with @vrigal

@La0 La0 changed the title Move Issue in_patch & new_for_revision to IssueLInk Move Issue non hashed attributes to IssueLInk Oct 22, 2024
@Archaeopteryx Archaeopteryx merged commit 7af61b4 into mozilla:master Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Code review backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Issue in_patch & new_for_revision attributes to IssueLInk

3 participants