Skip to content

Commit ccba824

Browse files
authored
Revert "Add support of macrobenchmark result analysis in fireci (#4285)" (#4312)
This reverts commit 00d8c72.
1 parent 3aac867 commit ccba824

File tree

23 files changed

+404
-1070
lines changed

23 files changed

+404
-1070
lines changed

.github/workflows/copyright-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
steps:
1313
- uses: actions/[email protected]
14-
- uses: actions/setup-python@v4
14+
- uses: actions/setup-python@v2
1515
with:
16-
python-version: '3.10'
16+
python-version: '3.9'
1717
- run: |
1818
pip install -e "ci/fireci"
1919
- run: |

.github/workflows/fireci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
runs-on: ubuntu-22.04
1717
steps:
1818
- uses: actions/[email protected]
19-
- uses: actions/setup-python@v4
19+
- uses: actions/setup-python@v2
2020
with:
21-
python-version: '3.10'
21+
python-version: '3.9'
2222
- run: |
2323
pip install -e "ci/fireci[test]"
2424
- run: |

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ firebase-crashlytics-ndk/.externalNativeBuild/
1111
firebase-crashlytics-ndk/.cxx/
1212
smoke-test-logs/
1313
smoke-tests/build-debug-headGit-smoke-test
14-
smoke-tests/firehorn.log
15-
macrobenchmark-output.json
14+
smoke-tests/firehorn.log

ci/fireci/fireci/internal.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
# limitations under the License.
1414

1515
import click
16+
import contextlib
1617
import functools
1718
import glob
1819
import itertools
1920
import logging
2021
import os
2122
import shutil
2223

23-
from contextlib import contextmanager, nullcontext
2424

2525
_logger = logging.getLogger('fireci')
2626

@@ -30,7 +30,7 @@ def _ensure_dir(directory):
3030
os.makedirs(directory)
3131

3232

33-
@contextmanager
33+
@contextlib.contextmanager
3434
def _artifact_handler(target_directory, artifact_patterns):
3535
_logger.debug(
3636
'Artifacts will be searched for in directories matching {} patterns and placed in {}'
@@ -45,7 +45,7 @@ def _artifact_handler(target_directory, artifact_patterns):
4545
target_name = os.path.join(target_directory, "_".join(path.split('/')))
4646
_logger.debug('Copying artifact {} to {}'.format(path, target_name))
4747
if os.path.isdir(path):
48-
shutil.copytree(path, target_name, dirs_exist_ok=True)
48+
shutil.copytree(path, target_name)
4949
else:
5050
shutil.copyfile(path, target_name)
5151

@@ -68,8 +68,8 @@ class _CommonOptions:
6868
'--artifact-patterns',
6969
default=('**/build/test-results', '**/build/reports'),
7070
help=
71-
'Shell-style artifact patterns that are copied into `artifact-target-dir`. '
72-
'Can be specified multiple times.',
71+
'Shell-style artifact patterns that are copied into `artifact-target-dir`.'\
72+
'Can be specified multiple times.',
7373
multiple=True,
7474
type=str,
7575
)
@@ -83,34 +83,30 @@ def main(options, **kwargs):
8383
setattr(options, k, v)
8484

8585

86-
def ci_command(name=None, cls=click.Command, group=main):
86+
def ci_command(name=None):
8787
"""Decorator to use for CI commands.
8888
8989
The differences from the standard @click.command are:
9090
9191
* Allows configuration of artifacts that are uploaded for later viewing in CI.
92-
* Registers the command automatically.
92+
* Registers the command automatically
9393
94-
:param name: Optional name of the task. Defaults to the function name that is decorated with this decorator.
95-
:param cls: Specifies whether the func is a command or a command group. Defaults to `click.Command`.
96-
:param group: Specifies the group the command belongs to. Defaults to the `main` command group.
94+
:param name: Optional name of the task. Defaults to the function name that is decorated with
95+
this decorator.
9796
"""
9897

9998
def ci_command(f):
10099
actual_name = f.__name__ if name is None else name
101100

102-
@click.command(name=actual_name, cls=cls, help=f.__doc__)
101+
@main.command(name=actual_name, help=f.__doc__)
103102
@_pass_options
104103
@click.pass_context
105104
def new_func(ctx, options, *args, **kwargs):
106105
with _artifact_handler(
107106
options.artifact_target_dir,
108-
options.artifact_patterns,
109-
) if cls is click.Command else nullcontext():
107+
options.artifact_patterns):
110108
return ctx.invoke(f, *args, **kwargs)
111109

112-
group.add_command(new_func)
113-
114110
return functools.update_wrapper(new_func, f)
115111

116112
return ci_command

ci/fireci/fireci/plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def discover():
2727
Note: plugins *must* define the `firebaseplugins` package as a namespace package.
2828
See: https://packaging.python.org/guides/packaging-namespace-packages/
2929
"""
30-
modules = pkgutil.walk_packages(fireciplugins.__path__,
31-
fireciplugins.__name__ + ".")
30+
modules = pkgutil.iter_modules(fireciplugins.__path__,
31+
fireciplugins.__name__ + ".")
3232
for _, name, _ in modules:
3333
importlib.import_module(name)

0 commit comments

Comments
 (0)