Skip to content

fix/reuse-manifest-instance-v2#1189

Closed
omerarslan0 wants to merge 2 commits intogoogleapis:mainfrom
omerarslan0:fix/reuse-manifest-instance
Closed

fix/reuse-manifest-instance-v2#1189
omerarslan0 wants to merge 2 commits intogoogleapis:mainfrom
omerarslan0:fix/reuse-manifest-instance

Conversation

@omerarslan0
Copy link
Copy Markdown

The main() function previously instantiated two separate Manifest objects: one for creating releases and another for creating pull requests. Each call to loadOrBuildManifest() triggered GitHub API requests to fetch repository configuration and release history.

When draft: true is enabled, this redundancy becomes especially costly because draft release resolution requires iterating through more GitHub API pages to find tagged releases, effectively doubling the API overhead.

This PR hoists the loadOrBuildManifest() call above both conditional blocks so a single, shared instance is used for both operations.

Fixes #1169

The main() function was creating two separate Manifest instances - one
for creating releases and one for creating pull requests. Each call to
loadOrBuildManifest() triggers GitHub API requests to fetch repository
config and release history.

This is especially costly when draft releases are enabled because draft
release resolution requires iterating through more GitHub API pages to
find tagged releases, effectively doubling the API overhead.

Hoist the loadOrBuildManifest() call above both conditional blocks so a
single instance is shared across both operations.

Fixes googleapis#1169
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Feb 26, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@omerarslan0
Copy link
Copy Markdown
Author

Is there anyone looking into this?

Copy link
Copy Markdown
Contributor

@ferrarimarco ferrarimarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Can you please revert formatting changes? thanks.

@omerarslan0 omerarslan0 changed the title fix: reuse single Manifest instance for releases and pull requests fix/reuse-manifest-instance-v2 Mar 5, 2026
@omerarslan0 omerarslan0 closed this Mar 5, 2026
@omerarslan0 omerarslan0 deleted the fix/reuse-manifest-instance branch March 5, 2026 14:40
@omerarslan0
Copy link
Copy Markdown
Author

omerarslan0 commented Mar 5, 2026

Reverted the formatting changes and opened a new clean PR: #1190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

draft: true causes performance regression in action execution time

3 participants