Project

General

Profile

Actions

Bug #3586

closed

[API] Job "priority" field defaults to "null", should default to "0"

Added by Peter Amstutz over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Story points:
0.5

Description

The "priority" field is used to sort the job queue, and it defaults to null. Unfortunately, the database automatically puts "null" values first in the sorting order, preventing priority from working as intended. The API server should assign a default numeric priority of 0 when creating the model and a NOT NULL constraint should be added to the schema.


Subtasks 2 (0 open2 closed)

Task #3749: Review 3586-job-priorityResolvedPeter Amstutz08/28/2014Actions
Task #3748: Add migrationResolvedPeter Amstutz08/28/2014Actions
Actions #1

Updated by Peter Amstutz over 9 years ago

  • Subject changed from Job "priority" field defaults to "null", should default to "0" to [API] Job "priority" field defaults to "null", should default to "0"
  • Description updated (diff)
  • Category set to API
Actions #2

Updated by Peter Amstutz over 9 years ago

  • Target version deleted (2014-08-27 Sprint)
Actions #3

Updated by Tom Clegg over 9 years ago

  • Target version set to Arvados Future Sprints
Actions #4

Updated by Tom Clegg over 9 years ago

  • Story points set to 0.5
Actions #5

Updated by Ward Vandewege over 9 years ago

  • Target version changed from Arvados Future Sprints to 2014-09-17 sprint
Actions #6

Updated by Tom Clegg over 9 years ago

  • Assigned To set to Peter Amstutz
Actions #7

Updated by Peter Amstutz over 9 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Tom Clegg over 9 years ago

This index seems to have been removed from structure.sql in 80cbf4d9, not sure why/how:

-- Name: pipeline_instance_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
--

CREATE UNIQUE INDEX pipeline_instance_owner_uuid_name_unique ON pipeline_instances USING btree (owner_uuid, name);

--

It comes back automatically if I do rake db:migrate.

Other than that, LGTM. Thanks.

Actions #9

Updated by Tom Clegg over 9 years ago

Ah, I get it (I think): the jobs_owner_uuid_name_unique and pipeline_instance_owner_uuid_name_unique indices stayed in db/structure.sql in the 3036 merge, even though they had been removed from the migration.

I've fixed my own database, so now it agrees with the migrations instead of agreeing with db/structure.sql. Now we just have to remove those two db/structure.sql entries so it agrees with the migrations. (Perhaps best to do it in a separate commit with refs #3036?)

Actions #10

Updated by Peter Amstutz over 9 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF