You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
When using the Cloud Build API, I initially attempted to await builds as a long running operation:
const[resp]=awaitcb.runBuildTrigger({projectId: project,triggerId: args.trigger,source: {projectId: project,branchName: 'master',// TODO: It might fail if we change the default branch.substitutions: {_GITHUB_TOKEN: token.token,_PR: args.pr.toString(),_PR_BRANCH: prData.head.ref,_PR_OWNER: prOwner,_REPOSITORY: prRepo,// _CONTAINER must contain the image digest. For example:// gcr.io/repo-automation-tools/nodejs-post-processor**@1234abcd**// TODO: read this from OwlBot.yaml._CONTAINER: args.image,_DEFAULT_BRANCH: args.defaultBranch??'master',},},});const[build]=awaitresp.promise();
This code did not successfully wait for a build to complete and return a build object.
As a workaround we implemented our own polling behavior (see here).
Expected Behavior
const [build] = await resp.promise(); waits for build to complete and returns the build object.
is this still an issue and specific to only Cloud Build or impacting more broader set of APIs
@hkdevandla I happened to notice this issue as a consumer of Cloud Build myself (we're using it for OwlBot). Not sure if it's happening for additional APIs.
I can try to provide a better isolated example -- I think Cloud Build is a good candidate for testing long running operations behavior, since builds can easily take a minute or two, maybe we just haven't noticed the behavior elsewhere?
Activity
hkdevandla commentedon Oct 20, 2021
@bcoe , is this still an issue and specific to only Cloud Build or impacting more broader set of APIs?
bcoe commentedon Oct 27, 2021
@hkdevandla I happened to notice this issue as a consumer of Cloud Build myself (we're using it for OwlBot). Not sure if it's happening for additional APIs.
I can try to provide a better isolated example -- I think Cloud Build is a good candidate for testing long running operations behavior, since builds can easily take a minute or two, maybe we just haven't noticed the behavior elsewhere?
hkdevandla commentedon Jan 20, 2022
@summer-ji-eng , please check if we can tackle this during the fixit. Thanks!
summer-ji-eng commentedon Feb 12, 2022
I hope that I bring a good news here. I finally successfully create Build and triggerBuild use forked gapic-generator-typescript.
The LRO
RunBuildTriggerwork as expected, it return apromise. It is able to wait for thepromisecomplete returnbuildobject.The
buildobject receiving is identical to the object get from polling service (code)The sample
buildoutput I received on local:@bcoe I close this ticket for now. But please reopen if it is still have issue on your side, I could use your build to debug.
chore: fix type error in test (#606)
chore: fix type error in test (#606)