Skip to content
Snippets Groups Projects
Commit 5410ca79 authored by Georges Racinet's avatar Georges Racinet
Browse files

HGitalyServicer: fixed 'accept-mr-iid' invocation metadata

All these metadata reach our code as `str` instances, this one
(previously not tried from the clients) was wrongly implemented as
if the incoming data were `bytes`.
parent 808e97d9
No related branches found
No related tags found
2 merge requests!211gRPC engines upgrade and stable branch merge,!206OperationService.UserFFBranch implementation
......@@ -200,7 +200,7 @@
# TODO project but apparently not used in py-heptapod hooks but still
# may be useful for user-defined hooks
if accept_mr_iid is not None:
environ[b'HEPTAPOD_ACCEPT_MR_IID'] = accept_mr_iid
environ[b'HEPTAPOD_ACCEPT_MR_IID'] = accept_mr_iid.encode('ascii')
def handle_value_error(self, context, exc_args):
context.abort(self.STATUS_CODE_MISSING_REPO_ARG, exc_args[0])
......
......@@ -132,7 +132,7 @@
assert loaded.ui.configbool(b'heptapod', b'native') is True
assert loaded.ui.configbool(b'heptapod', b'no-git') is False
context.set_invocation_md(metadatum(ACCEPT_MR_IID_KEY, b'609'))
context.set_invocation_md(metadatum(ACCEPT_MR_IID_KEY, '609'))
loaded = servicer.load_repo(grpc_repo, context, for_mutation_by=user)
assert loaded.ui.environ[b'HEPTAPOD_ACCEPT_MR_IID'] == b'609'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment