Error: "Unknown argument" while accessing git trigger

Bug #1309583 reported by Arati Mahimane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Fix Released
High
Arati Mahimane

Bug Description

Following problem was identified during end to end testing of the git trigger workflow:

When we do a git push, the git webhook sends a POST to the trigger with a payload.

However, some of the payload fields cannot be recognized by wsme, which resulted in a Client side Unknown argument error.

To resolve this issue, I added the ignore_extra_args=True in the wsme decorator for the TriggerController’s post method.

However, this resulted in another error in wsme - ‘kw’ referenced before assignment.

Found a bug in wsme (the ‘kw’ variable is returned before it is assigned) The bug can be fixed by initializing the variable before it is returned.

We discussed several approaches to resolve this problem:

1) Create a bug in wsme and submit a patch, which fixes the bug. However, this means that we will have a dependency on wsme since we do not know when it will be merged to upstream. (Handling this in https://bugs.launchpad.net/solum/+bug/1310674)

2) Keep our own copy of wsme on the vagrant vm. This will break the trigger workflow if solum is installed on some other environment.

3) Ignore the payload on the git side and do not send the payload to the solum API.

4) Don’t use wsme for the trigger workflow. Have a separate API endpoint for trigger since the POST request is going to be an unauthenticated request.

We have decided to go ahead with Approach 4. I will be submit a WIP patch for this.

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to solum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/88614

Changed in solum:
status: New → In Progress
Revision history for this message
Adrian Otto (aotto) wrote : Re: Fix issue in git trigger workflow

Please also pursue approach #1. I would like to avoid supporting multiple API frameworks in Solum, so once WSME is fixed, we should switch back to it.

It also seems to me that approach 3 would be less effort that approach 4. Why was it not chosen as the preferred short term fix?

Revision history for this message
Julien Vey (vey-julien) wrote :

I agree with Adrian. #1 would be a good "community effort". We can at least create the bug.

For #3, if I'm correct, you have this issue while using a Github webhook ?
I don't think you can cutomize what is sent with a Github webhook.

Adrian Otto (aotto)
description: updated
Adrian Otto (aotto)
summary: - Fix issue in git trigger workflow
+ Error: "Unknown argument" while accessing git trigger
Adrian Otto (aotto)
tags: added: git-trigger-wsme-bug
Revision history for this message
Angus Salkeld (asalkeld) wrote :

If we *have* to not use wsme, we can still use pecan. http://pecan.readthedocs.org/en/latest/quick_start.html

Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

Arati added a bug in wsme: https://bugs.launchpad.net/wsme/+bug/1311742

Arati submitted a patch to fix the bug: https://review.openstack.org/#/c/89883/

Adrian Otto (aotto)
tags: added: errors
Revision history for this message
Adrian Otto (aotto) wrote :

The fix got merged in wsme - https://review.openstack.org/#/c/89883/

Changed in solum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in solum:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.