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

roll forward rce testing #14

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
19 changes: 18 additions & 1 deletion ts/pulumi/bazel_rce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,30 @@ export class Tests extends Pulumi.ComponentResource {
]).apply(async ([endpoint, serviceName]) => {
// build something simple with bazel
try {
await util.promisify(child_process.execFile)(
const { stdout, stderr } = await util.promisify(
child_process.execFile
)(
'bazel',
['test', '//testing/...', `--remote_cache=${endpoint}`],
{
cwd: bazel.workspaceDirectory(),
}
);

/*
WARNING: Remote Cache: 21 errors during bulk transfer:
com.google.devtools.build.lib.remote.http.HttpException: 401 Unauthorized
401 Unauthorized
com.google.devtools.build.lib.remote.http.HttpException: 401 Unauthorized
401 Unauthorized
*/

if (
[stdout, stderr].some(fileDescriptor =>
/^\s+WARNING: Remote Cache:/g.test(fileDescriptor)
)
)
throw new Error(`bazel remote cache error: ${stderr}`);
return [];
} catch (e) {
return [
Expand Down