Skip to content
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

Ensure outputs are downloaded before sending TargetComplete event via BEP #17798

Closed
coeuvre opened this issue Mar 16, 2023 · 12 comments
Closed
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: feature request

Comments

@coeuvre
Copy link
Member

coeuvre commented Mar 16, 2023

Description of the feature request:

Currently, when building with --remote_download_toplevel, outputs of toplevel targets / aspects are only guaranteed downloaded before the build command exits.

However, the consumers of BEP, e.g. IDE, may listen to TargetComplete event from BEP and expect outputs are ready to be processed when the event is fired.

What underlying problem are you trying to solve with this feature?

We should wait for the downloads before sending TargetComplete event to not break the expectations for consumers of BEP.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

#6862
b/273514526

@coeuvre coeuvre self-assigned this Mar 16, 2023
@coeuvre coeuvre added team-Remote-Exec Issues and PRs for the Execution (Remote) team type: feature request P2 We'll consider working on this in future. (Assignee optional) labels Mar 16, 2023
@clint-stripe
Copy link

@coeuvre is there any work around besides disabling --remote_download_toplevel?

We have been using that flag for a while, and we're blocked by this issue as we upgrade from 5.4.0 to 6.1.1.

Our CI system uses BEP events to report test failures early and to locate artifacts -- we're seeing a last_message BEP event before some artifacts are written to disk, which is breaking assumptions our system made about locating build outputs on disk.

@coeuvre
Copy link
Member Author

coeuvre commented Apr 11, 2023

I am not aware of a workaround, but I am working on the fix and hopefully include it in 6.2.

@coeuvre
Copy link
Member Author

coeuvre commented Apr 11, 2023

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Apr 11, 2023
@keertk
Copy link
Member

keertk commented Apr 12, 2023

@bazel-io fork 6.2.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Apr 12, 2023
@coeuvre
Copy link
Member Author

coeuvre commented May 5, 2023

Fixed by a5dde12.

@coeuvre coeuvre closed this as completed May 5, 2023
@keertk
Copy link
Member

keertk commented May 5, 2023

@coeuvre should this be included in 6.3.0?

@coeuvre
Copy link
Member Author

coeuvre commented May 5, 2023

It's very hard to cherry-pick that commit into 6.x due to massive structure changes recently. But I understand that this is a blocking issue so I will figure out how to fix it for 6.x. Please mark it as blocker for 6.3 for now.

@keertk
Copy link
Member

keertk commented May 5, 2023

@bazel-io fork 6.3.0

@keertk
Copy link
Member

keertk commented Jun 28, 2023

Hi @coeuvre wanted to check if we should hold off on 6.3 for this? We tentatively scheduled RC1 for 7/5.

@coeuvre
Copy link
Member Author

coeuvre commented Jun 29, 2023

Yes, we should. I will work on the workaround for 6.3.0 now.

@hoj-stripe
Copy link

hoj-stripe commented Aug 11, 2023

@coeuvre Hi! We're trying to use the --experimental_remote_cache_eviction_retries flag and start evicting remote cache, but we're getting errors since we're also using--experimental_remote_download_outputs=toplevel. After bisecting on commits, we found out that the exact issue we are facing is unblocked with this commit(a5dde12) mentioned in this issue.

I was wondering if you could help us unblock by backporting this commit onto 6.x. Have you had any luck on cherrypicking this commit to Bazel 6.x or finding the workaround for the evicted cache? Any help would be appreciated!

@coeuvre
Copy link
Member Author

coeuvre commented Aug 22, 2023

a5dde12 cannot be cherry-picked into 6.x because of missing many other commits. The dedicated fix I created for 6.3 is a subset of a5dde12.

Can you share more details about the error so that I can learn the underlying issue and maybe create another dedicated fix? (it's better if we can move the discussion into a new issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants