Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5768338

Browse files
authored
Fix symbols upload (#47669)
There were a couple of issues with the script. The first one is it was always trying to upload the entire .buil_id folder rather than individual files and the second one is that it could not find depot_tools on path. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 25f5e28 commit 5768338

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

ci/builders/linux_fuchsia.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
{
7878
"name": "Upload to Symbol Server for arch: arm64",
7979
"language": "python3",
80+
"contexts": ["depot_tools_on_path"],
8081
"script": "flutter/tools/fuchsia/upload_to_symbol_server.py",
8182
"parameters": [
8283
"--symbol-dir",
@@ -162,6 +163,7 @@
162163
{
163164
"name": "Upload to Symbol Server for arch: x64",
164165
"language": "python3",
166+
"contexts": ["depot_tools_on_path"],
165167
"script": "flutter/tools/fuchsia/upload_to_symbol_server.py",
166168
"parameters": [
167169
"--symbol-dir",

tools/fuchsia/upload_to_symbol_server.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,20 @@ def process_symbols(should_upload, symbol_dir):
3939
for (dirpath, dirnames, filenames) in os.walk(full_path):
4040
files.extend([os.path.join(dirpath, f) for f in filenames])
4141

42+
print('List of files to upload')
43+
print('\n'.join(files))
44+
4245
# Remove dbg_files
4346
files = [f for f in files if 'dbg_success' not in f]
4447

4548
for file in files:
46-
remote_path = 'gs://%s/%s' % (
47-
FUCHSIA_ARTIFACTS_BUCKET_NAME, remote_filename(file)
49+
remote_path = 'gs://%s/%s/%s' % (
50+
FUCHSIA_ARTIFACTS_BUCKET_NAME, FUCHSIA_ARTIFACTS_DEBUG_NAMESPACE,
51+
remote_filename(file)
4852
)
4953
if should_upload:
50-
command = 'gsutil cp %s %s' % (full_path, remote_path)
54+
gsutil = os.path.join(os.environ['DEPOT_TOOLS'], 'gsutil.py')
55+
command = ['python3', gsutil, '--', 'cp', gsutil, file, remote_path]
5156
subprocess.check_call(command)
5257
else:
5358
print(remote_path)

0 commit comments

Comments
 (0)