Don't HTTP 500 when submitting a job to the API with a too long a machine name

RESOLVED WONTFIX

Status

Tree Management
Treeherder: API
P3
normal
RESOLVED WONTFIX
2 years ago
8 months ago

People

(Reporter: armenzg, Unassigned)

Tracking

Details

(Reporter)

Description

2 years ago
Jun 30 07:59:13 pulse-actions app/worker2.1: root	 Log uploaded to https://tc-gp-public-31d.s3-us-west-2.amazonaws.com/ateam/pulse-action-dev/4c83569d-f7a4-47fd-93bc-7526ff947602 
Jun 30 07:59:13 pulse-actions app/worker2.1: thsubmitter.treeherder_submitter	 "[{\"revision\": \"732d517ac4385204f7cabcea9316906bc48819f9\", \"project\": \"mozilla-inbound\", \"coalesced\": [], \"job\": {\"group_name\": \"unknown\", \"machine_platform\": {\"platform\": \"other\", \"architecture\": \"x86_64\", \"os_name\": \"linux\"}, \"name\": \"pulse_actions\", \"build_platform\": {\"platform\": \"other\", \"architecture\": \"x86_64\", \"os_name\": \"linux\"}, \"option_collection\": {\"opt\": true}, \"product_name\": \"no product\", \"state\": \"completed\", \"job_symbol\": \"Sch\", \"end_timestamp\": 1467298752, \"start_timestamp\": 1467298743, \"tier\": \"1\", \"who\": \"\", \"desc\": \"\", \"submit_timestamp\": 1467298743, \"reason\": \"\", \"result\": \"success\", \"machine\": \"6ce4cff2-a4fe-4b84-b66d-60a1efc9674e.prvt.dyno.rt.heroku.com\", \"job_guid\": \"1439ad65-dcd8-4598-a426-b1d7c5e18efd\", \"artifacts\": [{\"job_guid\": \"1439ad65-dcd8-4598-a426-b1d7c5e18efd\", \"name\": \"Job Info\", \"type\": \"json\", \"blob\": {\"job_details\": [{\"content_type\": \"link\", \"title\": \"File bug\", \"value\": \"bug template\", \"url\": \"https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&cc=armenzg%40mozilla.com&comment=Provide%20link.&component=General&form_name=enter_bug&product=Testing&short_desc=pulse_actions%20-%20Brief%20description%20of%20failure\"}]}}], \"log_references\": [{\"url\": \"https://tc-gp-public-31d.s3-us-west-2.amazonaws.com/ateam/pulse-action-dev/4c83569d-f7a4-47fd-93bc-7526ff947602\", \"name\": \"foo\", \"parse_status\": \"parsed\"}], \"group_symbol\": \"?\"}}]" 
Jun 30 07:59:13 pulse-actions app/worker2.1: mohawk.sender	 generating request header 
Jun 30 07:59:13 pulse-actions app/worker2.1: mohawk.base	 parsed URL parts:  
Jun 30 07:59:13 pulse-actions app/worker2.1: {'hostname': 'treeherder.mozilla.org', 
Jun 30 07:59:13 pulse-actions app/worker2.1:  'path': '/api/project/mozilla-inbound/jobs/', 
Jun 30 07:59:13 pulse-actions app/worker2.1:  'port': 443, 
Jun 30 07:59:13 pulse-actions app/worker2.1:  'query': '', 
Jun 30 07:59:13 pulse-actions app/worker2.1:  'resource': '/api/project/mozilla-inbound/jobs/', 
Jun 30 07:59:13 pulse-actions app/worker2.1:  'scheme': 'https'} 
Jun 30 07:59:13 pulse-actions app/worker2.1: mohawk.util	 calculating payload hash from: 
Jun 30 07:59:13 pulse-actions app/worker2.1: ['hawk.1.payload\n', 
Jun 30 07:59:13 pulse-actions app/worker2.1:  'application/json\n', 
Jun 30 07:59:13 pulse-actions app/worker2.1:  '[{"revision": "732d517ac4385204f7cabcea9316906bc48819f9", "project": "mozilla-inbound", "coalesced": [], "job": {"group_name": "unknown", "machine_platform": {"platform": "other", "architecture": "x86_64", "os_name": "linux"}, "name": "pulse_actions", "build_platform": {"platform": "other", "architecture": "x86_64", "os_name": "linux"}, "option_collection": {"opt": true}, "product_name": "no product", "state": "completed", "job_symbol": "Sch", "end_timestamp": 1467298752, "start_timestamp": 1467298743, "tier": "1", "who": "", "desc": "", "submit_timestamp": 1467298743, "reason": "", "result": "success", "machine": "6ce4cff2-a4fe-4b84-b66d-60a1efc9674e.prvt.dyno.rt.heroku.com", "job_guid": "1439ad65-dcd8-4598-a426-b1d7c5e18efd", "artifacts": [{"job_guid": "1439ad65-dcd8-4598-a426-b1d7c5e18efd", "name": "Job Info", "type": "json", "blob": {"job_details": [{"content_type": "link", "title": "File bug", "value": "bug template", "url": "https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&cc=armenzg%40mozilla.com&comment=Provide%20link.&component=General&form_name=enter_bug&product=Testing&short_desc=pulse_actions%20-%20Brief%20description%20of%20failure"}]}}], "log_references": [{"url": "https://tc-gp-public-31d.s3-us-west-2.amazonaws.com/ateam/pulse-action-dev/4c83569d-f7a4-47fd-93bc-7526ff947602", "name": "foo", "parse_status": "parsed"}], "group_symbol": "?"}}]', 
Jun 30 07:59:13 pulse-actions app/worker2.1:  '\n'] 
Jun 30 07:59:13 pulse-actions app/worker2.1: mohawk.util	 normalized resource for mac calc: hawk.1.header 
Jun 30 07:59:13 pulse-actions app/worker2.1: 1467298752 
Jun 30 07:59:13 pulse-actions app/worker2.1: v8wyMP 
Jun 30 07:59:13 pulse-actions app/worker2.1: POST 
Jun 30 07:59:13 pulse-actions app/worker2.1: /api/project/mozilla-inbound/jobs/ 
Jun 30 07:59:13 pulse-actions app/worker2.1: treeherder.mozilla.org 
Jun 30 07:59:13 pulse-actions app/worker2.1: 443 
Jun 30 07:59:13 pulse-actions app/worker2.1: lwpUJan1hvLYklPCOTMo2c7SIS8wnwRQTBvU5ozCFnY= 
Jun 30 07:59:13 pulse-actions app/worker2.1: mohawk.base	 Hawk header for URL=https://treeherder.mozilla.org/api/project/mozilla-inbound/jobs/ method=POST: Hawk mac="jqr7rGJ5XUbqbKTDn6GdJdT7x12phGZvC3Kj4qAJoXA=", hash="lwpUJan1hvLYklPCOTMo2c7SIS8wnwRQTBvU5ozCFnY=", id="pulse_actions", ts="1467298752", nonce="v8wyMP"
The exception seen on the Treeherder side was:
django.db.utils:DataError: (1406, "Data too long for column 'name' at row 1") '

Where name was the machine name.
Blocks: 1270169
Priority: -- → P3
Summary: Return nicer messages when submitting data → Don't HTTP 500 when submitting a job to the API with a too long a machine name
Submitting jobs/pushes via the API is now discouraged in favour of using Pulse (bug 1349182), so we're wontfixing API-specific issues.
Status: NEW → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.