Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6d60f59
ci: add import profiler check across monorepo
hebaalazzeh Jul 8, 2026
da118aa
ci: allow prerelease for python 3.15 in setup-python
hebaalazzeh Jul 8, 2026
5eab435
chore: propagate import_profile nox session across all packages and g…
hebaalazzeh Jul 8, 2026
8ccfb28
fix(ci): gracefully skip import_profile session if profiler script mi…
hebaalazzeh Jul 8, 2026
a0c075f
style(ci): reformat noxfile with black to fix lint errors
hebaalazzeh Jul 8, 2026
a7d2363
chore: revert google-crc32c noxfile modification to bypass broken kok…
hebaalazzeh Jul 8, 2026
68a0bdf
fix(ci): fix bazel integration tests and lint formatting
hebaalazzeh Jul 8, 2026
42dd64a
chore: revert gapic-generator template and noxfile changes in packages
hebaalazzeh Jul 8, 2026
a6491b5
ci: run import_profile without nox templates
hebaalazzeh Jul 8, 2026
9472ab6
address PR comments for import profiler CI
hebaalazzeh Jul 8, 2026
705b188
fix: update goldens for gapic-generator integration tests
hebaalazzeh Jul 9, 2026
885de7f
feat: implement dynamic import profile diff check against baseline
hebaalazzeh Jul 9, 2026
a2bd6ec
refactor: simplify CI without gapic-generator template changes and fi…
hebaalazzeh Jul 9, 2026
a77dc18
chore: remove nox installation from import profiler job
hebaalazzeh Jul 9, 2026
8a2d75b
chore: temporary commit to trigger profiler
hebaalazzeh Jul 9, 2026
9732c4e
chore: temporarily force profiler to run on all packages for benchmar…
hebaalazzeh Jul 9, 2026
df592fe
fix: resolve profiler baseline args and improve failure logs
hebaalazzeh Jul 9, 2026
b87f403
fix: restore dynamic label check for import profiler BUILD_TYPE
hebaalazzeh Jul 10, 2026
483e44b
chore: temporarily force profiler to run on all packages again for be…
hebaalazzeh Jul 10, 2026
943133d
fix: restore dynamic label check for import profiler BUILD_TYPE
hebaalazzeh Jul 10, 2026
8aff62c
fix: revert dummy __init__ changes to fix OwlBot Post Processor
hebaalazzeh Jul 10, 2026
ff77903
chore: address reviewer feedback on iterations, bytecode caching, and…
hebaalazzeh Jul 10, 2026
09932d5
chore: address omair's feedback on timeouts, baseline logic, threshol…
hebaalazzeh Jul 10, 2026
c05ad7d
chore: remove dynamic all_packages label logic to prevent unintention…
hebaalazzeh Jul 10, 2026
80ed579
Update scripts/import_profiler/profiler.py
hebaalazzeh Jul 13, 2026
e06bd2d
chore: add progress logs to profiler script to prevent appearing stuck
hebaalazzeh Jul 10, 2026
ee1645b
chore: address reviewer feedback (pathlib nit and median logic)
hebaalazzeh Jul 13, 2026
6a972d8
chore: dummy commit to trigger profiler CI on compute and kms packages
hebaalazzeh Jul 13, 2026
1c13c8c
chore: bypass absolute import fail threshold if baseline also exceeds it
hebaalazzeh Jul 13, 2026
85f4a4f
Update scripts/import_profiler/profiler.py
hebaalazzeh Jul 13, 2026
b100f3a
Update scripts/import_profiler/profiler.py
hebaalazzeh Jul 13, 2026
c6a0a71
chore: address CI feedback on git worktree, bytecode cleanup, and imp…
hebaalazzeh Jul 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/import-profiler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: import-profiler

on:
pull_request:
branches:
- main
- preview
# Trigger workflow on GitHub merge queue events
merge_group:
types: [checks_requested]

permissions:
contents: read

jobs:
import-profile:
runs-on: ubuntu-latest
steps:
Comment thread
hebaalazzeh marked this conversation as resolved.
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.15"
allow-prereleases: true
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
Comment thread
chalmerlowe marked this conversation as resolved.
Outdated
- name: Run import profiler
env:
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_TYPE: import_profile
PY_VERSION: "3.15"
run: |
ci/run_conditional_tests.sh
13 changes: 13 additions & 0 deletions packages/gapic-generator/gapic/templates/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ nox.options.sessions = [
"lint_setup_py",
"blacken",
"docs",
"import_profile",
]

# Error if a python version is missing
Expand Down Expand Up @@ -641,4 +642,16 @@ def core_deps_from_source(session, protobuf_implementation):
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
},
)


@nox.session(python="3.15")
def import_profile(session):
"""Ensure import times remain below defined thresholds."""
session.install(".")
profiler_script = os.path.join(CURRENT_DIRECTORY.parent.parent, "scripts", "import_profiler", "profiler.py")
{% if api.naming.module_namespace %}
session.run("python", profiler_script, "--module", "{{ api.naming.module_namespace[0] }}", "--iterations", "10")
{% else %}
session.run("python", profiler_script, "--module", "{{ api.naming.versioned_module_name }}", "--iterations", "10")
{% endif %}
Comment thread
hebaalazzeh marked this conversation as resolved.
Outdated
{% endblock %}
Loading