-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ci: add import profiler check across monorepo #17657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hebaalazzeh
wants to merge
17
commits into
main
Choose a base branch
from
feat/import-profiler-ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6d60f59
ci: add import profiler check across monorepo
hebaalazzeh da118aa
ci: allow prerelease for python 3.15 in setup-python
hebaalazzeh 5eab435
chore: propagate import_profile nox session across all packages and g…
hebaalazzeh 8ccfb28
fix(ci): gracefully skip import_profile session if profiler script mi…
hebaalazzeh a0c075f
style(ci): reformat noxfile with black to fix lint errors
hebaalazzeh a7d2363
chore: revert google-crc32c noxfile modification to bypass broken kok…
hebaalazzeh 68a0bdf
fix(ci): fix bazel integration tests and lint formatting
hebaalazzeh 42dd64a
chore: revert gapic-generator template and noxfile changes in packages
hebaalazzeh a6491b5
ci: run import_profile without nox templates
hebaalazzeh 9472ab6
address PR comments for import profiler CI
hebaalazzeh 705b188
fix: update goldens for gapic-generator integration tests
hebaalazzeh 885de7f
feat: implement dynamic import profile diff check against baseline
hebaalazzeh a2bd6ec
refactor: simplify CI without gapic-generator template changes and fi…
hebaalazzeh a77dc18
chore: remove nox installation from import profiler job
hebaalazzeh 8a2d75b
chore: temporary commit to trigger profiler
hebaalazzeh 9732c4e
chore: temporarily force profiler to run on all packages for benchmar…
hebaalazzeh df592fe
fix: resolve profiler baseline args and improve failure logs
hebaalazzeh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| 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: | ||
| - 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: Upgrade pip, setuptools, and wheel | ||
| run: | | ||
| python -m pip install --upgrade setuptools pip wheel | ||
| - name: Run import profiler | ||
| env: | ||
| BUILD_TYPE: 'all' | ||
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR doesn't touch any packages, so it's hard to tell what the action will look like. Can you temporarily touch some files to test it out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also see how long the new check would take if all packages were updated. In #17438, I added a new
unit_test:all_packagestag, that will run against all packages when added. Maybe we should support that here tooIt's possible we would only want to profile a few key packages instead of all of them. Most generated libraries should be very similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Daniel on a couple of performance issues:
google-cloud-compute, etc).Note
In case you've never done it... clicking on the
xORcheckmarknext to the commit number grants access to the test results for previous commits:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a temporary commit (8a2d75b) that adds a blank line to
google-cloud-computeandgoogle-api-coreso you can see the profiler run on a couple of real packages and review the output.Regarding the benchmark on all packages, we actually already support running the profiler against all packages in this PR! Similar to how the
unit_test:all_packageslabel works, there's logic in.github/workflows/import-profiler.ymlthat checks for animport_profile:all_packageslabel.If we want to see how long it takes across all ~240 packages to get an order of magnitude, we can simply apply the
import_profile:all_packageslabel to this PR and let it run.