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
opm serve: use pre-existing cache, if set and up-to-date (openshift#1005)
* opm serve: use pre-existing cache, if set and up-to-date
Signed-off-by: Joe Lanford <[email protected]>
* refactor to leave NewQuerier function untouched
Signed-off-by: Joe Lanford <[email protected]>
Signed-off-by: Joe Lanford <[email protected]>
Upstream-repository: operator-registry
Upstream-commit: 494b68e62a814a891821aeb2bd28f33abc1624ff
@@ -83,15 +77,12 @@ will not be reflected in the served content.
83
77
cmd.Flags().StringVar(&s.pprofAddr, "pprof-addr", "", "address of startup profiling endpoint (addr:port format)")
84
78
cmd.Flags().StringVar(&s.cacheDir, "cache-dir", "", "if set, sync and persist server cache directory")
85
79
cmd.Flags().BoolVar(&s.cacheOnly, "cache-only", false, "sync the serve cache and exit without serving")
86
-
cmd.Flags().BoolVar(&s.cacheEnforceIntegrity, "cache-enforce-integrity", false, "exit with error if cache is not present or has been invalidated. (default: true when --cache-dir is set and --cache-only is false, false otherwise), ")
87
80
returncmd
88
81
}
89
82
90
83
func (s*serve) run(ctx context.Context) error {
91
84
p:=newProfilerInterface(s.pprofAddr, s.logger)
92
-
iferr:=p.startEndpoint(); err!=nil {
93
-
returnfmt.Errorf("could not start pprof endpoint: %v", err)
94
-
}
85
+
p.startEndpoint()
95
86
iferr:=p.startCpuProfileCache(); err!=nil {
96
87
returnfmt.Errorf("could not start CPU profile: %v", err)
0 commit comments