Closed Bug 1963439 Opened 11 months ago Closed 11 months ago

newtab Inferred personalization setup places db tables, indices and migrations for impressions and clicks

Categories

(Firefox :: New Tab Page, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: thecount, Assigned: thecount)

References

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → sdowne
Attachment #9484385 - Attachment description: WIP: Bug 1963439 - newtab Inferred personalization setup places db tables, indices and migrations for impressions and clicks → Bug 1963439 - newtab Inferred personalization setup places db tables, indices and migrations for impressions and clicks
Status: NEW → ASSIGNED
Blocks: 1962198
Attachment #9484385 - Attachment description: Bug 1963439 - newtab Inferred personalization setup places db tables, indices and migrations for impressions and clicks → Bug 1963439 - newtab Inferred personalization setup places db tables, indices and migrations for impressions and clicks.
Pushed by sdowne@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c511ceb62edc newtab Inferred personalization setup places db tables, indices and migrations for impressions and clicks. r=mak
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch

I just noticed a possible typo in CREATE_IDX_MOZ_NEWTAB_IMPRESSION_TIMESTAMP that seems to refer to the clicks table instead.

I also see errors in the browser console like "Error: Error(s) encountered during statement execution: no such table: moz_newtab_story_click_idx_newtab_impression_timestamp" due to this code that was assuming indices name ended by "index". I honestly didn't remember about that. I think the code is a bit fragile, it should probably check the entity type SELECTing by name from "sqlite_master".

The former will require another db migration to be fixed (we can avoid having a new test though), removing the old index and creating the correct one.

Flags: needinfo?(sdowne)

Yup I think you're right.

I'm not really sure how to write a migration for this yet.

Any help or examples of a similar previous migration is appreciated.

We should probably make another bug for this right?

Flags: needinfo?(sdowne) → needinfo?(mak)

yeah, we need a separate bug. The migration is pretty much similar, bump up version, DROP INDEX IF EXISTS name, call new CREATE_IDX_ macro

Flags: needinfo?(mak)
Regressions: 1965852
See Also: → 1966590
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: