InterpreterError at template.tasks[0].metadata[1].description: unknown context value clientId

RESOLVED FIXED

Status

defect
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: apavel, Assigned: aki)

Tracking

unspecified
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(3 attachments)

Reporter

Description

4 months ago

Treeherder link: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=64aa8ab3332b0f84707424779368b5ace23ec761&selectedJob=222821906

Failure log: https://taskcluster-artifacts.net/AVaUjxsPSI-3L3cY-h_WtA/2/public/logs/chain_of_trust.log

File "/builds/scriptworker/lib/python3.6/site-packages/jsone/interpreter.py", line 100, in identifier
'unknown context value {}'.format(token.value))
jsone.shared.InterpreterError: InterpreterError at template.tasks[0].metadata[1].description: unknown context value clientId
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/builds/scriptworker/lib/python3.6/site-packages/scriptworker/cot/verify.py", line 1491, in verify_parent_task
await verify_parent_task_definition(chain, link)
File "/builds/scriptworker/lib/python3.6/site-packages/scriptworker/cot/verify.py", line 1358, in verify_parent_task_definition
raise CoTError("JSON-e error while rebuilding {} task definition: {}".format(parent_link.name, str(e)))
scriptworker.exceptions.CoTError: 'JSON-e error while rebuilding signing:parent task definition: InterpreterError at template.tasks[0].metadata[1].description: unknown context value clientId'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/builds/scriptworker/lib/python3.6/site-packages/scriptworker/cot/verify.py", line 1953, in verify_chain_of_trust
task_count = await verify_task_types(chain)
File "/builds/scriptworker/lib/python3.6/site-packages/scriptworker/cot/verify.py", line 1708, in verify_task_types
await valid_task_types[task_type](chain, obj)
File "/builds/scriptworker/lib/python3.6/site-packages/scriptworker/cot/verify.py", line 1493, in verify_parent_task
raise CoTError(e)
scriptworker.exceptions.CoTError: CoTError('JSON-e error while rebuilding signing:parent task definition: InterpreterError at template.tasks[0].metadata[1].description: unknown context value clientId',)
2019-01-19T03:22:46 ERROR - Hit ScriptWorkerException: CoTError('JSON-e error while rebuilding signing:parent task definition: InterpreterError at template.tasks[0].metadata[1].description: unknown context value clientId',)
2019-01-19T03:22:46 DEBUG - "/builds/scriptworker/artifacts/public/logs/chain_of_trust.log" is encoded with "None" and has mime/type "text/plain"
2019-01-19T03:22:46 INFO - "/builds/scriptworker/artifacts/public/logs/chain_of_trust.log" can be gzip'd. Compressing...

Reporter

Updated

4 months ago
Summary: Perma InterpreterError at template.tasks[0].metadata[1].description: unknown context value clientId → InterpreterError at template.tasks[0].metadata[1].description: unknown context value clientId

Aki, could we perhaps just ignore task.metadata.description? Otherwise we'll need to find a way for scriptworker to guess clientId, just to substitute it back into the task description. Which isn't an awful solution, just seems wasteful.

Comment hidden (Intermittent Failures Robot)

I think both might be possible.

If the decision task sticks the clientid in extra, or something, that would make it easy for the scriptworker to guess it.

Yeah. I'm curious why this doesn't show up in task.extra.action.context anywhere.

(In reply to Aki Sasaki [:aki] from comment #5)

Yeah. I'm curious why this doesn't show up in task.extra.action.context anywhere.

extra.context comes from here, so it would need to be added there.

(In reply to Tom Prince [:tomprince] from comment #6)

(In reply to Aki Sasaki [:aki] from comment #5)

Yeah. I'm curious why this doesn't show up in task.extra.action.context anywhere.

extra.context comes from here, so it would need to be added there.

Looks like we'll need to add it to https://github.com/mozilla-releng/scriptworker/blob/master/scriptworker/cot/verify.py#L1273-L1280 to use it, as well.

Assignee: nobody → aki

Trying to test against https://treeherder.mozilla.org/#/jobs?repo=try&revision=71e4dc289f5ac86a8597df8a0ab1acac0a7fd940 , but I may need someone to update the hooks for that push?

Testing is still blocked on the missing hooks.

I added the hooks, by patching ci-admin with:

diff --git ciadmin/generate/in_tree_actions.py ciadmin/generate/in_tree_actions.py
--- ciadmin/generate/in_tree_actions.py
+++ ciadmin/generate/in_tree_actions.py
@@ -36,13 +36,17 @@ async def hash_taskcluster_ymls():
     def should_hash(project):
         if not project.feature('gecko-actions'):
             return False
+        if project.alias == "try":
+            return True
         if not project.feature('taskcluster-push') and not project.feature('taskcluster-cron'):
             return False
         if project.is_try:
             return False
         return True
     tcyml_projects = list(filter(should_hash, projects))
-    tcymls = await asyncio.gather(*(tcyml.get(p.repo) for p in tcyml_projects))
+    tcymls = await asyncio.gather(*(tcyml.get(p.repo,
+                                              revision='71e4dc289f5ac86a8597df8a0ab1acac0a7fd940' if p.alias == 'try' else 'default',
+                                              ) for p in tcyml_projects))
 
     # hash the value of this .taskcluster.yml.  Note that this must match the
     # hashing in gecko:taskcluster/taskgraph/actions/registry.py

I added the linux build+signing tasks via add-new in this try push. They both pass verify_cot with the above scriptworker PR applied.

Attachment #9039887 - Attachment description: GitHub Pull Request → scriptworker cot PR

Comment 15

4 months ago
Pushed by asasaki@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1352060f32ff
add clientId to action context + description. r=dustin

Comment 16

4 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.