Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

shipit/api: action hook support #1782

Merged
merged 2 commits into from
Jan 8, 2019
Merged

shipit/api: action hook support #1782

merged 2 commits into from
Jan 8, 2019

Conversation

rail
Copy link
Contributor

@rail rail commented Jan 8, 2019

This adds support for handling both action kinds (task and hook). The
unusual part was that we cannot pre-set the action hook generated
taskId, we have to update it dynamically (in the DB and the input).

I tested it in staging only using Fennec (Firefox partials won't cooperate). Example generated action tasks for promote_fennec and ship_fennec. The values of previous_graph_ids look sane to me.

This adds support for handling both action kinds (task and hook). The
unusual part was that we cannot pre-set the action hook generated
taskId, we have to update it dynamically (in the DB and the input).
@rail rail self-assigned this Jan 8, 2019
@rail
Copy link
Contributor Author

rail commented Jan 8, 2019

@escapewindow can you take a look at this

Copy link
Contributor

@escapewindow escapewindow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not that familiar with this codebase, but what I see looks good, as do the relpro tasks this created.
Thanks!

queue = get_service('queue')
queue.createTask(phase.task_id, phase.rendered)
task_or_hook = phase.task_json
if 'hook_payload' in task_or_hook:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is correct. I don't know what's in task_or_hook or where it comes from.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is our internal structure.

# some parameters contain a lot of entries, so we hit the payload
# size limit. We don't use this parameter in any case, safe to
# remove
for long_param in ('existing_tasks', 'release_history', 'release_partner_config'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, is this fixed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved it to make the API file less crowded. :)

@rail rail merged commit a1e608f into mozilla:master Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants