Title says it all. There's no reason for to have more than 1 omitted link for each occurrence of an omission.

Comments

gabesullice created an issue. See original summary.

wim leers’s picture

Title: Remove duplicate omitted links. » Deduplicate `meta.omitted.links`

This is what you mean, right?

wim leers’s picture

Title: Deduplicate `meta.omitted.links` » Deduplicate `meta.omitted.links` based on `href` (`via` link)
Status: Active » Needs review
StatusFileSize
new1.33 KB

Perhaps something like this?

Status: Needs review » Needs work

The last submitted patch, 3: 2996000-3.patch, failed testing. View results

gabesullice’s picture

Status: Needs work » Needs review
StatusFileSize
new10.3 KB
new678 bytes
new11.87 KB

Yep, that's exactly it.

I started with the tests though and did some clean up that preps #2956084: Impossible to raise an error when an `include` is requested for an inaccessible relationship field..

Test only patch + cleanup is the interdiff.

Status: Needs review » Needs work

The last submitted patch, 5: 2996000-5.patch, failed testing. View results

gabesullice’s picture

Status: Needs work » Needs review
StatusFileSize
new913 bytes
new10.61 KB
new12.18 KB

The last submitted patch, 7: 2996000-7.tests_only.patch, failed testing. View results

gabesullice’s picture

StatusFileSize
new12.23 KB

Rerolled.

Status: Needs review » Needs work

The last submitted patch, 9: 2996000-9.patch, failed testing. View results

gabesullice’s picture

Status: Needs work » Needs review
StatusFileSize
new1.9 KB
new12.89 KB

Ah, nice catch! /me high-fives the testbot.

That error reminded me of something that bothered me before...

In #3, link keys lost their non-deterministic property, i.e. the same URLs always have the same hash. That means it would theoretically be possible to hardcode a client to look for that hash. It was necessary to do that in order to deduplicate items by their URL, but it's not necessary for that to be true across requests.

I don't want clients to even have the possibility to hardcode a link key hash. So this interdiff introduces a salt in order to get the best of both worlds :)

Status: Needs review » Needs work

The last submitted patch, 11: 2996000-11.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

gabesullice’s picture

Status: Needs work » Needs review
StatusFileSize
new3.42 KB
new14.18 KB

Whoops, that was a silly oversight.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

  • gabesullice committed 7bcb819 on 8.x-2.x
    Issue #2996000 by gabesullice, Wim Leers: Deduplicate `meta.omitted....
gabesullice’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.