You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/abderrahimkitouni/.local/bin/bst", line 8, in <module>
sys.exit(cli())
^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/buildstream/_frontend/cli.py", line 271, in override_main
original_main(self, args=args, prog_name=prog_name, complete_var=None, standalone_mode=standalone_mode, **extra)
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 1655, in invoke
sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 920, in make_context
self.parse_args(ctx, args)
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 1378, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 2360, in handle_parse_result
value = self.process_value(ctx, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 2316, in process_value
value = self.type_cast_value(ctx, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 2302, in type_cast_value
return tuple(convert(x) for x in check_iter(value))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/core.py", line 2302, in <genexpr>
return tuple(convert(x) for x in check_iter(value))
^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/click/types.py", line 82, in __call__
return self.convert(value, param, ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/buildstream/_frontend/cli.py", line 62, in convert
spec = RemoteSpec.new_from_string(value, self.purpose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/buildstream/_remotespec.py", line 316, in new_from_string
if remote_type not in [RemoteType.INDEX, RemoteType.STORAGE, RemoteType.ALL]:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abderrahimkitouni/.local/pipx/venvs/buildstream/lib/python3.11/site-packages/buildstream/types.py", line 70, in __eq__
raise ValueError("Unexpected comparison between {} and {}".format(self, repr(other)))
ValueError: Unexpected comparison between index and 'index'
It seems it is trying to compare the string 'index' with the enum value RemoteType.INDEX and failing.
The text was updated successfully, but these errors were encountered:
cs-shadow
changed the title
Passing type=storage or type=index on the command line raises error
Passing type as part of --artifact-remote url raises error
Jul 26, 2023
cs-shadow
changed the title
Passing type as part of --artifact-remote url raises error
Passing type as part of --artifact-remote url raises unhandled error
Jul 26, 2023
I think this issue affects passing the type option in general, and not any particular values.
You're also right that it seems to be stemming from incorrect comparisons between strings and ENUMs. #1850 should fix it I believe, reviews appreciated :)
Trying to add an artifact cache by passing it on the command line. I have the following arguments added to
bst build
.--artifact-remote url=http://example.com:8982,type=index --artifact-remote url=http://example.com:8980,type=storage
I get this error:
It seems it is trying to compare the string
'index'
with the enum valueRemoteType.INDEX
and failing.The text was updated successfully, but these errors were encountered: