Closed Bug 741412 Opened 12 years ago Closed 8 years ago

Remove 'version' column from releases table

Categories

(Release Engineering Graveyard :: Applications: Balrog (backend), defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

References

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/3010] [balrog])

Attachments

(3 files)

In Balrog we have a "version" column on the Releases table. We also have "extv" and "appv" in the blobs. I think we've been treating the column as the same as one of the blob versions, but I'm not sure which. If it is indeed meant to be the same, we should rename it thusly to avoid confusion.
Priority: -- → P3
Whiteboard: [balrog]
Product: mozilla.org → Release Engineering
mass component change
Component: General Automation → Balrog: Backend
I had a quick look into this. The getReleases() & getReleaseInfo() methods on the release table support querying by product and version, but we never use that in the actual code (just in tests). Most likely this is left over from the way we used to identify the build making the request (for matching partials). updateRelease() does use product & version, we'd have to look closer at the logic in admin/views/releases.py.
Forgot to say the point of looking (above) was that we'd just drop the two columns from the releases table if they were no longer needed. We'll have extensionVersion in the newer attributes anyways.
(In reply to Nick Thomas [:nthomas] from comment #3)
> Forgot to say the point of looking (above) was that we'd just drop the two
> columns from the releases table if they were no longer needed. We'll have
> extensionVersion in the newer attributes anyways.

I realized today that I think we need to keep Product in order to make permissions work correctly (that is, after bug 749297 is fixed).
Whiteboard: [balrog] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/3000] [balrog]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/3000] [balrog] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/3005] [balrog]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/3005] [balrog] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/3010] [balrog]
I verified that version is dead and I've got patches incoming to kill it.
Assignee: nobody → bhearsum
Attachment #8716997 - Flags: review?(nthomas)
Attachment #8716998 - Flags: review?(nthomas)
Comment on attachment 8716997 [details] [review]
kill version in the releases table

r+ with some suggestions to make a test more robust given over on Github.
Attachment #8716997 - Flags: review?(nthomas) → review+
Attachment #8716998 - Flags: review?(nthomas) → review+
Looks like there's nothing to update past the cli.py layer, because the verisons passed to it still get used in general blob construction.
Attachment #8717532 - Flags: review?(nthomas)
Attachment #8717532 - Flags: review?(nthomas) → review+
Summary: considering renaming 'version' to 'extv' in releases table → Remove 'version' column from releases table
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/7d0ed82ca7e944705e67692ca9340d7785440188
Merge pull request #51 from bhearsum/kill-version

bug 741412: Kill version in releases table. r=nthomas
Attachment #8716997 - Flags: checked-in+
Comment on attachment 8716998 [details] [review]
remove version from the ui

Landed the two Balrog changes. Going to wait until after high priority releases are done before landing to prod (and to land the tools repo change), on the off chance I bust something.
Attachment #8716998 - Flags: checked-in+
When I upgraded the dev db the upgrade script hung. I poked around /proc and it looks like the connection to mysql was lost while dropping the releases_history.version column. I tried rerunning it a couple of times and the same thing happened. The query probably takes too long because releases_history is so huge. I tried finishing the migration by hand, but the query still refused to complete. #data tells me that the database server would run out of space if the ALTER statement ran to completion, so for now we're just going to leave the column in the table. I've updated the migrate_version table to pretend we're on the new schema version already, and we can go ahead and get rid of it during the transition to CloudOps. So, note to self: don't run the migrate script when pushing to prod.
Attachment #8717532 - Flags: checked-in+
I pushed this to production today. I manually set the version in the migrate_version table to 10, and we'll drop the version column later by hand.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
There was a bit of fallout landing this in production. Because I didn't even attempt to run the migration script, the releases.version column remained in the database, which has a NOT NULL constraint, and caused nightly submissions to fail. To fix, I removed the releases.version column by hand (but left releases_history.version, whose table is too big to be able to drop the column), and I immediately saw nightly submissions work again.
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/0d0a49ee9311418703625fea8bf478b19985eaa0
[balrog-ui] Merge pull request #17 from bhearsum/kill-version

bug 741412: remove 'version' from releases UI. r=nthomas
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: