Commits


Raúl Cumplido authored and Jonathan Keane committed 8f5936f4bc5
ARROW-16165: [CI][Archery] Fix nightly query to crossbow to send reports This PR fixes the current issue with our nightly reports as seen here: https://github.com/ursacomputing/crossbow/runs/5840285120?check_suite_focus=true) The issue could be reproduced using the prefix that crossbow reports uses: ``` job_prefix=nightly-${{ inputs.report_type }}-$(date -I) job_id=$(archery crossbow latest-prefix ${job_prefix}) ``` Before the fix, when using the following query: ``` $ archery crossbow latest-prefix --no-fetch nightly-packaging-2022-04-10 Traceback (most recent call last): File "/home/raulcd/open_source/pyarrow-dev/bin/archery", line 33, in <module> sys.exit(load_entry_point('archery', 'console_scripts', 'archery')()) File "/home/raulcd/open_source/pyarrow-dev/lib/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/raulcd/open_source/pyarrow-dev/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/raulcd/open_source/pyarrow-dev/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/raulcd/open_source/pyarrow-dev/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/raulcd/open_source/pyarrow-dev/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/raulcd/open_source/pyarrow-dev/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/home/raulcd/open_source/pyarrow-dev/lib/python3.10/site-packages/click/decorators.py", line 38, in new_func return f(get_current_context().obj, *args, **kwargs) File "/home/raulcd/open_source/arrow/dev/archery/archery/crossbow/cli.py", line 237, in latest_prefix latest = queue.latest_for_prefix(prefix) File "/home/raulcd/open_source/arrow/dev/archery/archery/crossbow/core.py", line 568, in latest_for_prefix latest_id += "-0" TypeError: unsupported operand type(s) for +=: 'int' and 'str' ``` After the fix: ``` $ archery crossbow latest-prefix --no-fetch nightly-packaging-2022-04-10 nightly-packaging-2022-04-10-0 $ archery crossbow latest-prefix --no-fetch nightly-packaging nightly-packaging-2022-04-11-0 ``` Closes #12862 from raulcd/ARROW-16165 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Jonathan Keane <jkeane@gmail.com>