Skip to content

Commit

Permalink
Merge branch 'master' into dev_tming_p2p
Browse files Browse the repository at this point in the history
  • Loading branch information
tming authored Apr 25, 2024
2 parents 41fa845 + b340bdf commit 86442ae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/backend/booster/bk_dist/booster/pkg/booster.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ func (b *Booster) getWorkersEnv() map[string]string {
requiredEnv[env.KeyExecutorForceLocalKeys] = strings.Join(b.config.Works.ForceLocalList, env.CommonBKEnvSepKey)
}

ccEnsureOwnerVal := env.GetEnv(env.KeyExecutorCCEnsureFileOwnerkey)
if ccEnsureOwnerVal != "" {
requiredEnv[env.KeyExecutorCCEnsureFileOwnerkey] = ccEnsureOwnerVal
}

if b.config.Works.WriteMemroy {
requiredEnv[env.KeyExecutorWriteMemory] = envValueTrue
}
Expand Down
1 change: 1 addition & 0 deletions src/backend/booster/bk_dist/common/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (
KeyExecutorPumpSearchLinkResult = "PUMP_SEARCH_LINK_RESULT"
KeyExecutorPumpLstatByDir = "PUMP_LSTAT_BY_DIR"
KeyExecutorForceLocalKeys = "FORCE_LOCAL_KEYS"
KeyExecutorCCEnsureFileOwnerkey = "CC_ENSURE_OWNER"
KeyExecutorEnvProfile = "ENV_PROFILE"
KeyExecutorWorkerSideCache = "WORKER_SIDE_CACHE"
KeyExecutorLocalRecord = "LOCAL_RECORD"
Expand Down
1 change: 1 addition & 0 deletions src/backend/booster/bk_dist/handler/cc/booster.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var bazelActionConstOptions = []string{
env.GetEnvKey(env.BoosterType),
env.GetEnvKey(env.KeyExecutorIOTimeout),
env.GetEnvKey(env.KeyExecutorForceLocalKeys),
env.GetEnvKey(env.KeyExecutorCCEnsureFileOwnerkey),
}

func appendPreload() error {
Expand Down
7 changes: 6 additions & 1 deletion src/backend/booster/bk_dist/handler/cc/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,12 @@ func getOutputFile(args []string, sandbox *dcSyscall.Sandbox) []string {
seenFprofileDir := false
var inputFile string
var outputFile string

// transfer input args if an arg is a file
args, err := expandOptions(sandbox, args)
if err != nil {
blog.Warnf("cc: [%v] getOutputFile expand options: %v", args, err)
return nil
}
for index := 0; index < len(args); index++ {
arg := args[index]

Expand Down

0 comments on commit 86442ae

Please sign in to comment.