5044: "Unexpected error when validating the diff" when having gitlfs files in the diff since RBTools 5.2

Leo

What version are you running?

RBTools 5.2.1 (Python 3.13.3)
RBCommons hosted by Beanbag
git version 2.47.1.windows.2

What steps will reproduce the problem?

  1. create a new branch from master
  2. commit and push at least one change in a gitlfs tracked file (in our case it's some "large" text file tracked with lsf)
  3. execute the command line: rbt post --branch master

What is the expected output? What do you see instead?

Expected: should create the Code Review in RBCommon
Instead: print the following error:

ERROR: Error validating diff

Unexpected error when validating the diff: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Basic *********************************************==</ArgumentValue><RequestId>*************</RequestId><HostId>******************************************************************************************************</HostId></Error> (API Error 224: Diff Parsing Failed)

NB: ArgumentValue, RequestId and HostId have been edited in the previous text block

What operating system are you using?

Client: Microsoft Windows 11 Pro 10.0.22631 Build 22631

Attach the debug out from the command.

$ rbt post --debug --branch master
>>> RBTools 5.2.1
>>> Python 3.13.3 (tags/v3.13.3:6280bb5, Apr  8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
>>> Running on Windows-11-10.0.22631-SP0
>>> Home = C:\Users\Leo
>>> Current directory = C:\Projects\XXX
>>> Command line: rbt post --debug --branch master
>>> [scan] Checking for available SCMs for C:\Projects\XXX...
>>> [scan] Only considering the following types of repositories: git
>>> [scan] Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config --get core.bare
>>> Running: git rev-parse --show-toplevel
>>> [scan] SCM scan complete. Found git (C:\Projects\XXX)
>>> [scan] Verifying repository information...
>>> Running: git rev-parse --git-dir
>>> Running: git config --get core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git show-ref --verify refs/remotes/p4/master
>>> Command errored with rc=128: git show-ref --verify refs/remotes/p4/master
>>> Command stdout=b''
>>> Command stderr=b"fatal: 'refs/remotes/p4/master' - not a valid ref\n"
>>> Running: git config --get remote.origin.url
>>> [scan] Successfully found repository information: <RepositoryInfo(path='https://bitbucket.org/organization/repository.git', base_path='', local_path='C:\\Projects\\XXX')>
>>> Making HTTP GET request to https://rbcommons.com/s/organization/api/
>>> Cached response for HTTP GET https://rbcommons.com/s/organization/api/ expired and was not modified
>>> Making HTTP GET request to https://rbcommons.com/s/organization/api/repositories/?name=XXX&only-fields=id%2Cname%2Cmirror_path%2Cpath&only-links=info%2Cdiff_file_attachments&tool=git%2Cperforce%2Csubversion%2Ctfs_git
>>> Cached response for HTTP GET https://rbcommons.com/s/organization/api/repositories/?name=XXX&only-fields=id%2Cname%2Cmirror_path%2Cpath&only-links=info%2Cdiff_file_attachments&tool=git%2Cperforce%2Csubversion%2Ctfs_git expired and was not modified
>>> Making HTTP GET request to https://rbcommons.com/s/organization/api/repositories/****/info/
>>> Got API Error 209 (HTTP code 501): The specified repository is not able to perform this action.
>>> Error data: {'err': {'code': 209, 'msg': 'The specified repository is not able to perform this action.', 'type': 'repository-request-not-supported'}, 'stat': 'fail'}
>>> Running: git rev-parse refs/heads/chris/FOUND-11563-gate-without-wall-affect
>>> Running: git branch --remotes
>>> Running: git rev-parse origin/dev/release
>>> Running: git rev-list 817bb9419104bf7b6cac814a6ca4f94c08cf4472 --not --remotes=origin
>>> Running: git status --porcelain --untracked-files=no --ignore-submodules=dirty
>>> Running: git version
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules --find-renames --no-ext-diff 817bb9419104bf7b6cac814a6ca4f94c08cf4472..7dfaae286dbb612baf6cb7b8228fd47395205f22
>>> Making HTTP GET request to https://rbcommons.com/s/organization/api/validation/diffs/
>>> Cached response for HTTP GET https://rbcommons.com/s/organization/api/validation/diffs/ expired and was not modified
>>> Making HTTP POST request to https://rbcommons.com/s/organization/api/validation/diffs/
>>> Got API Error 224 (HTTP code 400): Unexpected error when validating the diff: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Basic ***********************************==</ArgumentValue><RequestId>*****************</RequestId><HostId>*********************************</HostId></Error>
>>> Error data: {'err': {'code': 224, 'msg': 'Unexpected error when validating the diff: <?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Basic ***********************************==</ArgumentValue><RequestId>*****************</RequestId><HostId>*********************************</HostId></Error>', 'type': 'diff-parse-error'}, 'stat': 'fail'}
Traceback (most recent call last):
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\request.py", line 1496, in make_request
    rsp = self._urlopen(Request(
        request.url, body, headers, request.method))
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\cache.py", line 333, in make_request
    return LiveHTTPResponse(urlopen(request))
                            ~~~~~~~^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\urllib\request.py", line 189, in urlopen
    return opener.open(url, data, timeout)
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\urllib\request.py", line 495, in open
    response = meth(req, response)
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\request.py", line 535, in http_response
    response = self.parent.error('http', request, response,
                                 response.status, response.msg,
                                 response.headers)
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\urllib\request.py", line 533, in error
    return self._call_chain(*args)
           ~~~~~~~~~~~~~~~~^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\urllib\request.py", line 466, in _call_chain
    result = func(*args)
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\urllib\request.py", line 613, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\commands\post.py", line 998, in main
    self._validate_squashed_diff(squashed_diff)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\commands\post.py", line 1844, in _validate_squashed_diff
    validator.validate_diff(
    ~~~~~~~~~~~~~~~~~~~~~~~^
        self.repository.id,
        ^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        base_dir=squashed_diff.base_dir,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        **validate_kwargs)
        ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\decorators.py", line 23, in request_method
    return self._transport.execute_request_method(method_wrapper,
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
                                                  *args, **kwargs)
                                                  ^^^^^^^^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\transport\sync.py", line 323, in execute_request_method
    return self._execute_request(request)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\transport\sync.py", line 344, in _execute_request
    rsp = self.server.make_request(request)
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\request.py", line 1499, in make_request
    self.process_error(e.code, e.read())
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\api\request.py", line 1462, in process_error
    raise create_api_error(http_status, rsp['err']['code'], rsp,
                           rsp['err']['msg'])
rbtools.api.errors.BadRequestError: Unexpected error when validating the diff: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Basic ***********************************==</ArgumentValue><RequestId>*****************</RequestId><HostId>*********************************</HostId></Error> (API Error 224: Diff Parsing Failed)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Scripts\rbt.exe\__main__.py", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\commands\main.py", line 214, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\commands\base\commands.py", line 1139, in run_from_argv
    exit_code = self.main(*args) or 0
                ~~~~~~~~~^^^^^^^
  File "C:\Users\Leo\AppData\Local\Programs\Python\Python313\Lib\site-packages\rbtools\commands\post.py", line 1008, in main
    raise CommandError('Error validating diff\n\n%s%s'
                       % (msg_prefix, e))
rbtools.commands.base.errors.CommandError: Error validating diff

Unexpected error when validating the diff: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Basic ***********************************==</ArgumentValue><RequestId>*****************</RequestId><HostId>*********************************</HostId></Error> (API Error 224: Diff Parsing Failed)

Please provide any additional information below.