1. ToolSearch
Input
{
"query": "select:mcp__sourcegraph__sg_keyword_search,mcp__sourcegraph__sg_list_files,mcp__sourcegraph__sg_read_file,mcp__sourcegraph__sg_nls_search",
"max_results": 5
}Output
{'matches': ['mcp__sourcegraph__sg_keyword_search', 'mcp__sourcegraph__sg_list_files', 'mcp__sourcegraph__sg_read_file', 'mcp__sourcegraph__sg_nls_search'], 'query': 'select:mcp__sourcegraph__sg_keyword_search,mcp__sourcegraph__sg_list_files,mcp__sourcegraph__sg_read_file,mcp__sourcegraph__sg_nls_search', 'total_deferred_tools': 33}2. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet podLifecycleManager OR pod_lifecycle_manager OR lifecycle_manager"
}Output
{'content': '{"text":"No results.\\n\\nNo results found."}', 'structuredContent': {'text': 'No results.\n\nNo results found.'}}3. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet volumeManager OR volume_manager"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/volume_manager_fake.go\\n16: \\n17: package volumemanager\\n18: \\n19: \\n28: \\n29: // FakeVolumeManager is a test implementation that just tracks calls\\n30: type FakeVolumeManager struct {\\n31: \\tvolumes map[v1.UniqueVolumeName]bool\\n32: \\n36: \\n37: var _ VolumeManager = &FakeVolumeManager{}\\n38: \\n39: // NewFakeVolumeManager creates a new VolumeManager test instance\\n40: func NewFakeVolumeManager(initialVolumes []v1.UniqueVolumeName, unmountDelay time.Duration, unmountError error) *FakeVolumeManager {\\n41: \\tvolumes := map[v1.UniqueVolumeName]bool{}\\n42: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/metrics/metrics.go\\n32: \\t// Metric keys for Volume Manager.\\n33: \\tvolumeManagerTotalVolumes = \\"volume_manager_total_volumes\\"\\n34: \\treconstructVolumeOperationsTotal = \\"reconstruct_volume_operations_total\\"\\n35: \\n43: \\ttotalVolumesDesc = metrics.NewDesc(\\n44: \\t\\tvolumeManagerTotalVolumes,\\n45: \\t\\t\\"Number of volumes in Volume Manager\\",\\n46: \\n23: \\t\\"k8s.io/component-base/metrics/legacyregistry\\"\\n24: \\t\\"k8s.io/kubernetes/pkg/kubelet/volumemanager/cache\\"\\n25: \\t\\"k8s.io/kubernetes/pkg/volume\\"\\n26: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/volume_manager.go\\n16: \\n17: package volumemanager\\n18: \\n19: \\n180: // Must be pre-initialized.\\n181: func NewVolumeManager(\\n182: \\tcontrollerAttachDetachEnabled bool,\\n183: \\n241: \\n242: // volumeManager implements the VolumeManager interface\\n243: type volumeManager struct {\\n244: \\t// kubeClient is the kube API client used by DesiredStateOfWorldPopulator to\\n245: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/OWNERS\\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/reconciler/reconciler.go\\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/cache/desired_state_of_wold_selinux_metrics.go\\n29: \\t\\t&compbasemetrics.GaugeOpts{\\n30: \\t\\t\\tName: \\"volume_manager_selinux_container_errors_total\\",\\n31: \\t\\t\\tHelp: \\"Number of errors when kubelet cannot compute SELinux context for a container. Kubelet can\'t start such a Pod then and it will retry, therefore value of this metric may not represent the actual nr. of containers.\\",\\n32: \\n77: \\t\\t&compbasemetrics.GaugeOpts{\\n78: \\t\\t\\tName: \\"volume_manager_selinux_volumes_admitted_total\\",\\n79: \\t\\t\\tHelp: \\"Number of volumes whose SELinux context was fine and will be mounted with mount -o context option.\\",\\n80: \\n37: \\t\\t&compbasemetrics.GaugeOpts{\\n38: \\t\\t\\tName: \\"volume_manager_selinux_container_warnings_total\\",\\n39: \\t\\t\\tStabilityLevel: compbasemetrics.ALPHA,\\n40: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/nodeshutdown/nodeshutdown_manager.go\\n53: \\tProbeManager prober.Manager\\n54: \\tVolumeManager volumemanager.VolumeManager\\n55: \\tRecorder record.EventRecorder\\n56: \\n99: \\tkillPodFunc eviction.KillPodFunc\\n100: \\tvolumeManager volumemanager.VolumeManager\\n101: }\\n102: \\n125: \\t\\tkillPodFunc: conf.KillPodFunc,\\n126: \\t\\tvolumeManager: conf.VolumeManager,\\n127: \\t}\\n128: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/reconciler/reconstruct.go\\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/reconciler/reconstruct_common.go\\n31: \\t\\"k8s.io/kubernetes/pkg/kubelet/config\\"\\n32: \\t\\"k8s.io/kubernetes/pkg/kubelet/volumemanager/metrics\\"\\n33: \\tvolumepkg \\"k8s.io/kubernetes/pkg/volume\\"\\n34: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/volumemanager/re...4. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet devicePlugin OR device_plugin"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/devicemanager/plugin/v1beta1/api.go\\n37: const (\\n38: \\t// errFailedToDialDevicePlugin is the error raised when the device plugin could not be\\n39: \\t// reached on the registered socket\\n40: \\terrFailedToDialDevicePlugin = \\"failed to dial device plugin:\\"\\n41: \\t// errUnsupportedVersion is the error raised when the device plugin uses an API version not\\n42: \\n30: type ClientHandler interface {\\n31: \\tPluginConnected(string, DevicePlugin) error\\n32: \\tPluginDisconnected(string)\\n33: \\n19: import (\\n20: \\tapi \\"k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1\\"\\n21: )\\n22: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/devicemanager/plugin/v1beta1/client.go\\n32: \\n33: // DevicePlugin interface provides methods for accessing Device Plugin resources, API and unix socket.\\n34: type DevicePlugin interface {\\n35: \\tAPI() api.DevicePluginClient\\n36: \\tResource() string\\n37: \\n52: \\thandler ClientHandler\\n53: \\tclient api.DevicePluginClient\\n54: }\\n55: \\n141: \\n142: \\treturn api.NewDevicePluginClient(c), c, nil\\n143: }\\n144: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/pluginmanager/pluginwatcher/README.md\\n32: During plugin initialization phase, Kubelet will issue Plugin specific calls\\n33: (e.g: DevicePlugin::GetDevicePluginOptions).\\n34: \\n35: \\n51: - The plugin name sent during Registration.GetInfo grpc should be unique\\n52: for the given plugin type (CSIPlugin or DevicePlugin).\\n53: \\n54: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/container_manager_stub.go\\n102: \\n103: func (cm *containerManagerStub) GetDevicePluginResourceCapacity() (v1.ResourceList, v1.ResourceList, []string) {\\n104: \\treturn cm.extendedPluginResources, cm.extendedPluginResources, []string{}\\n105: \\n205: \\n206: func NewStubContainerManagerWithDevicePluginResource(extendedPluginResources v1.ResourceList) ContainerManager {\\n207: \\treturn &containerManagerStub{\\n208: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/devicemanager/plugin/v1beta1/stub.go\\n319: \\n320: // GetDevicePluginOptions returns DevicePluginOptions settings for the device plugin.\\n321: func (m *Stub) GetDevicePluginOptions(ctx context.Context, e *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error) {\\n322: \\toptions := &pluginapi.DevicePluginOptions{\\n323: \\t\\tPreStartRequired: m.preStartContainerFlag,\\n324: \\n90: \\n91: // NewDevicePluginStub returns an initialized DevicePlugin Stub.\\n92: func NewDevicePluginStub(devs []*pluginapi.Device, socket string, name string, preStartContainerFlag bool, getPreferredAllocationFlag bool) *Stub {\\n93: \\n94: \\n152: \\tif err != nil {\\n153: \\t\\tklog.ErrorS(err, \\"Failed to add watch\\", \\"devicePluginPath\\", pluginapi.DevicePluginPath)\\n154: \\t\\treturn err\\n155: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/devicemanager/endpoint.go\\n43: \\tresourceName string\\n44: \\tapi pluginapi.DevicePluginClient\\n45: \\tstopTime time.Time\\n46: \\n24: \\n25: \\tpluginapi \\"k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1\\"\\n26: \\tplugin \\"k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/plugin/v1beta1\\"\\n27: \\n50: // This is to be used during normal device plugin registration.\\n51: func newEndpointImpl(p plugin.DevicePlugin) *endpointImpl {\\n52: \\treturn &endpointImpl{\\n53: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/fake_container_manager.go\\n141: \\n142: func (cm *FakeContainerManager) GetDevicePluginResourceCapacity() (v1.ResourceList, v1.ResourceList, []string) {\\n143: \\tcm.Lock()\\n144: \\n144: \\tdefer cm.Unlock()\\n145: \\tcm.CalledFunctions = append(cm.CalledFunctions, \\"GetDevicePluginResourceCapacity\\")\\n146: \\treturn nil, nil, []string{}\\n147: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/metrics/metrics.go\\n82: \\t// ...5. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet containerRuntime OR CRI client"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/apis/config/types.go\\n556: \\n557: // KubeletX509Authentication contains settings related to x509 client certificate authentication\\n558: type KubeletX509Authentication struct {\\n559: \\t// clientCAFile is the path to a PEM-encoded certificate bundle. If set, any request presenting a client certificate\\n560: \\t// signed by one of the authorities in the bundle is authenticated with a username corresponding to the CommonName,\\n561: \\t// and groups corresponding to the Organization in the client certificate.\\n562: \\tClientCAFile string\\n563: }\\n564: \\n495: \\t// Examples:\'unix:///path/to/runtime.sock\', \'npipe:////./pipe/runtime\'\\n496: \\tContainerRuntimeEndpoint string\\n497: \\n498: \\n428: \\t// +optional\\n429: \\tShutdownGracePeriodCriticalPods metav1.Duration\\n430: \\t// ShutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based\\n431: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/container_manager.go\\n169: \\tKubeletOOMScoreAdj int32\\n170: \\tContainerRuntime string\\n171: \\tCgroupsPerQOS bool\\n172: \\n32: \\t\\"k8s.io/apiserver/pkg/server/healthz\\"\\n33: \\tinternalapi \\"k8s.io/cri-api/pkg/apis\\"\\n34: \\tpodresourcesapi \\"k8s.io/kubelet/pkg/apis/podresources/v1\\"\\n35: \\n257: \\t\\t\\t\\t// This is legal, so we report the devices anyway,\\n258: \\t\\t\\t\\t// let the client decide what to do.\\n259: \\t\\t\\t\\trespDevs = append(respDevs, &podresourcesapi.ContainerDevices{\\n260: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet.go\\n70: \\t\\"k8s.io/component-helpers/apimachinery/lease\\"\\n71: \\tinternalapi \\"k8s.io/cri-api/pkg/apis\\"\\n72: \\truntimeapi \\"k8s.io/cri-api/pkg/apis/runtime/v1\\"\\n73: \\tremote \\"k8s.io/cri-client/pkg\\"\\n74: \\t\\"k8s.io/klog/v2\\"\\n75: \\n3139: \\n3140: // ListMetricDescriptors gets the descriptors for the metrics that will be returned in ListPodSandboxMetrics.\\n3141: func (kl *Kubelet) ListMetricDescriptors(ctx context.Context) ([]*runtimeapi.MetricDescriptor, error) {\\n3142: \\treturn kl.containerRuntime.ListMetricDescriptors(ctx)\\n3143: }\\n3144: \\n556: \\t//\\n557: \\t// This client must not be modified to include credentials, because it is\\n558: \\t// critical that credentials not leak from the client to arbitrary hosts.\\n559: \\tinsecureContainerLifecycleHTTPClient := &http.Client{\\n560: \\t\\tTransport: &http.Transport{\\n561: \\t\\t\\tTLSClientConfig: &tls.Config{InsecureSkipVerify: true},\\n562: \\t\\t},\\n563: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/cm/container_manager_unsupported.go\\n28: \\tv1 \\"k8s.io/api/core/v1\\"\\n29: \\tclientset \\"k8s.io/client-go/kubernetes\\"\\n30: \\t\\"k8s.io/client-go/tools/record\\"\\n31: \\tinternalapi \\"k8s.io/cri-api/pkg/apis\\"\\n32: \\t\\"k8s.io/kubernetes/pkg/kubelet/cadvisor\\"\\n33: \\n46: \\n47: func NewContainerManager(_ mount.Interface, _ cadvisor.Interface, _ NodeConfig, failSwapOn bool, recorder record.EventRecorder, kubeClient clientset.Interface) (ContainerManager, error) {\\n48: \\treturn &unsupportedContainerManager{}, nil\\n49: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/apis/podresources/client.go\\n26: \\n27: \\t\\"k8s.io/cri-client/pkg/util\\"\\n28: \\t\\"k8s.io/kubelet/pkg/apis/podresources/v1\\"\\n29: \\n54: \\n55: // GetV1Client returns a client for the PodResourcesLister grpc service\\n56: func GetV1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1.PodResourcesListerClient, *grpc.ClientConn, error) {\\n57: \\taddr, dialer, err := util.GetAddressAndDialer(socket)\\n58: \\n34: \\n35: // GetV1alpha1Client returns a client for the PodResourcesLister grpc service\\n36: // Note: This is deprecated\\n37: func GetV1alpha1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1alpha1.PodResourcesListerClient, *grpc.ClientConn, error) {\\n38: \\tadd...6. mcp__sourcegraph__sg_list_files
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/lifecycle"
}Output
{'content': '{"text":"pkg/kubelet/lifecycle/admission_failure_handler_stub.go\\npkg/kubelet/lifecycle/doc.go\\npkg/kubelet/lifecycle/handlers.go\\npkg/kubelet/lifecycle/handlers_test.go\\npkg/kubelet/lifecycle/interfaces.go\\npkg/kubelet/lifecycle/predicate.go\\npkg/kubelet/lifecycle/predicate_test.go\\n"}', 'structuredContent': {'text': 'pkg/kubelet/lifecycle/admission_failure_handler_stub.go\npkg/kubelet/lifecycle/doc.go\npkg/kubelet/lifecycle/handlers.go\npkg/kubelet/lifecycle/handlers_test.go\npkg/kubelet/lifecycle/interfaces.go\npkg/kubelet/lifecycle/predicate.go\npkg/kubelet/lifecycle/predicate_test.go\n'}}7. mcp__sourcegraph__sg_list_files
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/cm/devicemanager"
}Output
{'content': '{"text":"pkg/kubelet/cm/devicemanager/checkpoint/\\npkg/kubelet/cm/devicemanager/plugin/\\npkg/kubelet/cm/devicemanager/OWNERS\\npkg/kubelet/cm/devicemanager/endpoint.go\\npkg/kubelet/cm/devicemanager/endpoint_test.go\\npkg/kubelet/cm/devicemanager/manager.go\\npkg/kubelet/cm/devicemanager/manager_test.go\\npkg/kubelet/cm/devicemanager/pod_devices.go\\npkg/kubelet/cm/devicemanager/pod_devices_test.go\\npkg/kubelet/cm/devicemanager/topology_hints.go\\npkg/kubelet/cm/devicemanager/topology_hints_test.go\\npkg/kubelet/cm/devicemanager/types.go\\n"}', 'structuredContent': {'text': 'pkg/kubelet/cm/devicemanager/checkpoint/\npkg/kubelet/cm/devicemanager/plugin/\npkg/kubelet/cm/devicemanager/OWNERS\npkg/kubelet/cm/devicemanager/endpoint.go\npkg/kubelet/cm/devicemanager/endpoint_test.go\npkg/kubelet/cm/devicemanager/manager.go\npkg/kubelet/cm/devicemanager/manager_test.go\npkg/kubelet/cm/devicemanager/pod_devices.go\npkg/kubelet/cm/devicemanager/pod_devices_test.go\npkg/kubelet/cm/devicemanager/topology_hints.go\npkg/kubelet/cm/devicemanager/topology_hints_test.go\npkg/kubelet/cm/devicemanager/types.go\n'}}8. mcp__sourcegraph__sg_list_files
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/volumemanager"
}Output
{'content': '{"text":"pkg/kubelet/volumemanager/cache/\\npkg/kubelet/volumemanager/metrics/\\npkg/kubelet/volumemanager/populator/\\npkg/kubelet/volumemanager/reconciler/\\npkg/kubelet/volumemanager/OWNERS\\npkg/kubelet/volumemanager/volume_manager.go\\npkg/kubelet/volumemanager/volume_manager_fake.go\\npkg/kubelet/volumemanager/volume_manager_test.go\\n"}', 'structuredContent': {'text': 'pkg/kubelet/volumemanager/cache/\npkg/kubelet/volumemanager/metrics/\npkg/kubelet/volumemanager/populator/\npkg/kubelet/volumemanager/reconciler/\npkg/kubelet/volumemanager/OWNERS\npkg/kubelet/volumemanager/volume_manager.go\npkg/kubelet/volumemanager/volume_manager_fake.go\npkg/kubelet/volumemanager/volume_manager_test.go\n'}}9. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet/kuberuntime kubeGenericRuntimeManager"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/kuberuntime_manager.go\\n97: \\n98: type kubeGenericRuntimeManager struct {\\n99: \\truntimeName string\\n100: \\n187: \\n188: // NewKubeGenericRuntimeManager creates a new kubeGenericRuntimeManager\\n189: func NewKubeGenericRuntimeManager(\\n190: \\trecorder record.EventRecorder,\\n191: \\n226: \\ttracer := tracerProvider.Tracer(instrumentationScope)\\n227: \\tkubeRuntimeManager := &kubeGenericRuntimeManager{\\n228: \\t\\trecorder: recorder,\\n229: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/helpers.go\\n91: // toKubeContainer converts runtimeapi.Container to kubecontainer.Container.\\n92: func (m *kubeGenericRuntimeManager) toKubeContainer(c *runtimeapi.Container) (*kubecontainer.Container, error) {\\n93: \\tif c == nil || c.Id == \\"\\" || c.Image == nil {\\n94: \\n119: // TODO: Remove this once it becomes obsolete.\\n120: func (m *kubeGenericRuntimeManager) sandboxToKubeContainer(s *runtimeapi.PodSandbox) (*kubecontainer.Container, error) {\\n121: \\tif s == nil || s.Id == \\"\\" {\\n122: \\n132: // guarantees that only one of them is set.\\n133: func (m *kubeGenericRuntimeManager) getImageUser(ctx context.Context, image string) (*int64, string, error) {\\n134: \\tresp, err := m.imageService.ImageStatus(ctx, &runtimeapi.ImageSpec{Image: image}, false)\\n135: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/kuberuntime_gc.go\\n39: \\tclient internalapi.RuntimeService\\n40: \\tmanager *kubeGenericRuntimeManager\\n41: \\tpodStateProvider podStateProvider\\n42: \\n45: // NewContainerGC creates a new containerGC.\\n46: func newContainerGC(client internalapi.RuntimeService, podStateProvider podStateProvider, manager *kubeGenericRuntimeManager, tracer trace.Tracer) *containerGC {\\n47: \\treturn &containerGC{\\n48: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/security_context.go\\n28: // determineEffectiveSecurityContext gets container\'s security context from v1.Pod and v1.Container.\\n29: func (m *kubeGenericRuntimeManager) determineEffectiveSecurityContext(pod *v1.Pod, container *v1.Container, uid *int64, username string) (*runtimeapi.LinuxContainerSecurityContext, error) {\\n30: \\teffectiveSc := securitycontext.DetermineEffectiveSecurityContext(pod, container)\\n31: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/kuberuntime_logs.go\\n31: // just pass in empty string \\"\\".\\n32: func (m *kubeGenericRuntimeManager) ReadLogs(ctx context.Context, path, containerID string, apiOpts *v1.PodLogOptions, stdout, stderr io.Writer) error {\\n33: \\t// Convert v1.PodLogOptions into internal log options.\\n34: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/kuberuntime_image.go\\n34: // secrets if necessary.\\n35: func (m *kubeGenericRuntimeManager) PullImage(ctx context.Context, image kubecontainer.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, error) {\\n36: \\timg := image.Image\\n37: \\n86: // the local storage. It returns (\\"\\", nil) if the image isn\'t in the local storage.\\n87: func (m *kubeGenericRuntimeManager) GetImageRef(ctx context.Context, image kubecontainer.ImageSpec) (string, error) {\\n88: \\tresp, err := m.imageService.ImageStatus(ctx, toRuntimeAPIImageSpec(image), false)\\n89: \\n98: \\n99: func (m *kubeGenericRuntimeManager) GetImageSize(ctx context.Context, image kubecontainer.ImageSpec) (uint64, error) {\\n100: \\tresp, err := m.imageService.ImageStatus(ctx, toRuntimeAPIImageSpec(image), false)\\n101: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/kuberuntime_sandbox.go\\n40: // createPodSandbox creates a pod sandbox and returns (podSandBoxID, message, error).\\n41: func (m *kubeGenericRuntimeManager) createPodSandbox(ctx context.Context, pod *v1.Pod, attempt uint32) (string, string, er...10. mcp__sourcegraph__sg_list_files
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/pleg"
}Output
{'content': '{"text":"pkg/kubelet/pleg/doc.go\\npkg/kubelet/pleg/evented.go\\npkg/kubelet/pleg/evented_test.go\\npkg/kubelet/pleg/generic.go\\npkg/kubelet/pleg/generic_test.go\\npkg/kubelet/pleg/pleg.go\\n"}', 'structuredContent': {'text': 'pkg/kubelet/pleg/doc.go\npkg/kubelet/pleg/evented.go\npkg/kubelet/pleg/evented_test.go\npkg/kubelet/pleg/generic.go\npkg/kubelet/pleg/generic_test.go\npkg/kubelet/pleg/pleg.go\n'}}11. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet podWorker OR pod_worker"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/pod_workers.go\\n599: \\n600: func newPodWorkers(\\n601: \\tpodSyncer podSyncer,\\n602: \\n91: // teardown of containers (terminating), or cleanup (terminated).\\n92: type PodWorkerState int\\n93: \\n94: \\n550: // in the pod status change).\\n551: type podWorkers struct {\\n552: \\t// Protects all per worker fields.\\n553: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/metrics/metrics.go\\n42: \\tNodeStartupKey = \\"node_startup_duration_seconds\\"\\n43: \\tPodWorkerDurationKey = \\"pod_worker_duration_seconds\\"\\n44: \\tPodStartDurationKey = \\"pod_start_duration_seconds\\"\\n45: \\n47: \\tCgroupManagerOperationsKey = \\"cgroup_manager_duration_seconds\\"\\n48: \\tPodWorkerStartDurationKey = \\"pod_worker_start_duration_seconds\\"\\n49: \\tPodStatusSyncDurationKey = \\"pod_status_sync_duration_seconds\\"\\n50: \\n208: \\t)\\n209: \\t// PodWorkerDuration is a Histogram that tracks the duration (in seconds) in takes to sync a single pod.\\n210: \\t// Broken down by the operation type.\\n211: \\tPodWorkerDuration = metrics.NewHistogramVec(\\n212: \\t\\t&metrics.HistogramOpts{\\n213: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/pod_workers_test.go\\n42: \\n43: // fakePodWorkers runs sync pod function in serial, so we can have\\n44: // deterministic behaviour in testing.\\n45: type fakePodWorkers struct {\\n46: \\tlock sync.Mutex\\n47: \\n1928: \\n1929: // TestFakePodWorkers verifies that the fakePodWorkers behaves the same way as the real podWorkers\\n1930: // for their invocation of the syncPodFn.\\n1931: func TestFakePodWorkers(t *testing.T) {\\n1932: \\tfakeRecorder := &record.FakeRecorder{}\\n1933: \\n390: \\n391: func createPodWorkers() (*podWorkers, *containertest.FakeRuntime, map[types.UID][]syncPodRecord) {\\n392: \\tlock := sync.Mutex{}\\n393: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet.go\\n1106: \\t// Since the podManager may be unaware of some running pods due to force deletion, the\\n1107: \\t// podWorkers are responsible for triggering a sync of pods that are no longer desired but\\n1108: \\t// must still run to completion.\\n1109: \\tpodWorkers PodWorkers\\n1110: \\n1111: \\n690: \\tklet.workQueue = queue.NewBasicWorkQueue(klet.clock)\\n691: \\tklet.podWorkers = newPodWorkers(\\n692: \\t\\tklet,\\n693: \\n721: \\t\\tmachineInfo,\\n722: \\t\\tklet.podWorkers,\\n723: \\t\\tkubeDeps.OSInterface,\\n724: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet_pods.go\\n1355: \\t// Now that we have recorded any terminating pods, and added new pods that should be running,\\n1356: \\t// record a summary here. Not all possible combinations of PodWorkerSync values are valid.\\n1357: \\tcounts := make(map[PodWorkerSync]int)\\n1358: \\tfor _, sync := range workingPods {\\n1359: \\n1289: \\t\\t}\\n1290: \\t\\tkl.podWorkers.UpdatePod(UpdatePodOptions{\\n1291: \\t\\t\\tUpdateType: kubetypes.SyncPodCreate,\\n1292: \\n1318: \\t\\tklog.V(3).InfoS(\\"Handling termination and deletion of the pod to pod workers\\", \\"pod\\", klog.KObj(pod), \\"podUID\\", pod.UID)\\n1319: \\t\\tkl.podWorkers.UpdatePod(UpdatePodOptions{\\n1320: \\t\\t\\tUpdateType: kubetypes.SyncPodKill,\\n1321: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – test/instrumentation/testdata/pkg/kubelet/metrics/metrics.go\\n33: \\tNodeLabelKey = \\"node\\"\\n34: \\tPodWorkerDurationKey = \\"pod_worker_duration_seconds\\"\\n35: \\tPodStartDurationKey = \\"pod_start_duration_seconds\\"\\n36: \\n36: \\tCgroupManagerOperationsKey = \\"cgroup_manager_duration_seconds\\"\\n37: \\tPodWorkerStartDurationKey = \\"pod_worker_start_duration_seconds\\"\\n38: \\tPLEGRelistDurationKey = \\"pleg_relist_duration_seconds\\"\\n39: \\n122: \\t)\\n123: \\t// PodWorkerDuration is a Histogram that tracks the duration (in seconds) i...12. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet/kuberuntime RuntimeService ImageManagerService"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/instrumented_services.go\\n27: \\n28: // instrumentedRuntimeService wraps the RuntimeService and records the operations\\n29: // and errors metrics.\\n30: type instrumentedRuntimeService struct {\\n31: \\tservice internalapi.RuntimeService\\n32: }\\n33: \\n38: \\n39: // instrumentedImageManagerService wraps the ImageManagerService and records the operations\\n40: // and errors metrics.\\n41: type instrumentedImageManagerService struct {\\n42: \\tservice internalapi.ImageManagerService\\n43: }\\n44: \\n33: \\n34: // Creates an instrumented RuntimeInterface from an existing RuntimeService.\\n35: func newInstrumentedRuntimeService(service internalapi.RuntimeService) internalapi.RuntimeService {\\n36: \\treturn &instrumentedRuntimeService{service: service}\\n37: }\\n38: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go\\n111: \\t\\truntimeHelper: runtimeHelper,\\n112: \\t\\truntimeService: runtimeService,\\n113: \\t\\timageService: imageService,\\n114: \\n95: \\n96: func newFakeKubeRuntimeManager(runtimeService internalapi.RuntimeService, imageService internalapi.ImageManagerService, machineInfo *cadvisorapi.MachineInfo, osInterface kubecontainer.OSInterface, runtimeHelper kubecontainer.RuntimeHelper, keyring credenti ... [line truncated]\\n97: \\tctx := context.Background()\\n98: \\n122: \\n123: \\ttypedVersion, err := runtimeService.Version(ctx, kubeRuntimeAPIVersion)\\n124: \\tif err != nil {\\n125: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/kuberuntime_manager.go\\n137: \\t// gRPC service clients\\n138: \\truntimeService internalapi.RuntimeService\\n139: \\timageService internalapi.ImageManagerService\\n140: \\n141: \\n223: \\tctx := context.Background()\\n224: \\truntimeService = newInstrumentedRuntimeService(runtimeService)\\n225: \\timageService = newInstrumentedImageManagerService(imageService)\\n226: \\ttracer := tracerProvider.Tracer(instrumentationScope)\\n227: \\n238: \\t\\truntimeHelper: runtimeHelper,\\n239: \\t\\truntimeService: runtimeService,\\n240: \\t\\timageService: imageService,\\n241: \\n"}', 'structuredContent': {'text': '# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/instrumented_services.go\n27: \n28: // instrumentedRuntimeService wraps the RuntimeService and records the operations\n29: // and errors metrics.\n30: type instrumentedRuntimeService struct {\n31: \tservice internalapi.RuntimeService\n32: }\n33: \n38: \n39: // instrumentedImageManagerService wraps the ImageManagerService and records the operations\n40: // and errors metrics.\n41: type instrumentedImageManagerService struct {\n42: \tservice internalapi.ImageManagerService\n43: }\n44: \n33: \n34: // Creates an instrumented RuntimeInterface from an existing RuntimeService.\n35: func newInstrumentedRuntimeService(service internalapi.RuntimeService) internalapi.RuntimeService {\n36: \treturn &instrumentedRuntimeService{service: service}\n37: }\n38: \n\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go\n111: \t\truntimeHelper: runtimeHelper,\n112: \t\truntimeService: runtimeService,\n113: \t\timageService: imageService,\n114: \n95: \n96: func newFakeKubeRuntimeManager(runtimeService internalapi.RuntimeService, imageService internalapi.ImageManagerService, machineInfo *cadvisorapi.MachineInfo, osInterface kubecontainer.OSInterface, runtimeHelper kubecontainer.RuntimeHelper, keyring credenti ... [line truncated]\n97: \tctx := context.Background()\n98: \n122: \n123: \ttypedVersion, err := runtimeService.Version(ctx, kubeRuntimeAPIVersion)\n124: \tif err != nil {\n125: \n\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kuberuntime/kuberuntime_manager.go\n137: \t// gRPC service clients\n138: \truntimeService internalapi.RuntimeSe...13. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/lifecycle/interfaces.go"
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/lifecycle/interfaces.go\\n1: /*\\n2: Copyright 2016 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package lifecycle\\n18: \\n19: import \\"k8s.io/api/core/v1\\"\\n20: \\n21: // PodAdmitAttributes is the context for a pod admission decision.\\n22: // The member fields of this struct should never be mutated.\\n23: type PodAdmitAttributes struct {\\n24: \\t// the pod to evaluate for admission\\n25: \\tPod *v1.Pod\\n26: \\t// all pods bound to the kubelet excluding the pod being evaluated\\n27: \\tOtherPods []*v1.Pod\\n28: }\\n29: \\n30: // PodAdmitResult provides the result of a pod admission decision.\\n31: type PodAdmitResult struct {\\n32: \\t// if true, the pod should be admitted.\\n33: \\tAdmit bool\\n34: \\t// a brief single-word reason why the pod could not be admitted.\\n35: \\tReason string\\n36: \\t// a brief message explaining why the pod could not be admitted.\\n37: \\tMessage string\\n38: }\\n39: \\n40: // PodAdmitHandler is notified during pod admission.\\n41: type PodAdmitHandler interface {\\n42: \\t// Admit evaluates if a pod can be admitted.\\n43: \\tAdmit(attrs *PodAdmitAttributes) PodAdmitResult\\n44: }\\n45: \\n46: // PodAdmitTarget maintains a list of handlers to invoke.\\n47: type PodAdmitTarget interface {\\n48: \\t// AddPodAdmitHandler adds the specified handler.\\n49: \\tAddPodAdmitHandler(a PodAdmitHandler)\\n50: }\\n51: \\n52: // PodSyncLoopHandler is invoked during each sync loop iteration.\\n53: type PodSyncLoopHandler interface {\\n54: \\t// ShouldSync returns true if the pod needs to be synced.\\n55: \\t// This operation must return immediately as its called for each pod.\\n56: \\t// The provided pod should never be modified.\\n57: \\tShouldSync(pod *v1.Pod) bool\\n58: }\\n59: \\n60: // PodSyncLoopTarget maintains a list of handlers to pod sync loop.\\n61: type PodSyncLoopTarget interface {\\n62: \\t// AddPodSyncLoopHandler adds the specified handler.\\n63: \\tAddPodSyncLoopHandler(a PodSyncLoopHandler)\\n64: }\\n65: \\n66: // ShouldEvictResponse provides the result of a should evict request.\\n67: type ShouldEvictResponse struct {\\n68: \\t// if true, the pod should be evicted.\\n69: \\tEvict bool\\n70: \\t// a brief CamelCase reason why the pod should be evicted.\\n71: \\tReason string\\n72: \\t// a brief message why the pod should be evicted.\\n73: \\tMessage string\\n74: }\\n75: \\n76: // PodSyncHandler is invoked during each sync pod operation.\\n77: type PodSyncHandler interface {\\n78: \\t// ShouldEvict is invoked during each sync pod operation to determine\\n79: \\t// if the pod should be evicted from the kubelet. If so, the pod status\\n80: \\t// is updated to mark its phase as failed with the provided reason and message,\\n81: \\t// and the pod is immediately killed.\\n82: \\t// This operation must return immediately as its called for each sync pod.\\n83: \\t// The provided pod should never be modified.\\n84: \\tShouldEvict(pod *v1.Pod) ShouldEvictResponse\\n85: }\\n86: \\n87: // PodSyncTarget maintains a list of handlers to pod sync.\\n88: type PodSyncTarget interface {\\n89: \\t// AddPodSyncHandler adds the specified handler\\n90: \\tAddPodSyncHandler(a PodSyncHandler)\\n91: }\\n92: \\n93: // PodLifecycleTarget groups a set of lifecycle interface...14. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/pleg/pleg.go"
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/pleg/pleg.go\\n1: /*\\n2: Copyright 2015 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package pleg\\n18: \\n19: import (\\n20: \\t\\"time\\"\\n21: \\n22: \\t\\"k8s.io/apimachinery/pkg/types\\"\\n23: \\tkubecontainer \\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n24: )\\n25: \\n26: // PodLifeCycleEventType define the event type of pod life cycle events.\\n27: type PodLifeCycleEventType string\\n28: \\n29: type RelistDuration struct {\\n30: \\t// The period for relisting.\\n31: \\tRelistPeriod time.Duration\\n32: \\t// The relisting threshold needs to be greater than the relisting period +\\n33: \\t// the relisting time, which can vary significantly. Set a conservative\\n34: \\t// threshold to avoid flipping between healthy and unhealthy.\\n35: \\tRelistThreshold time.Duration\\n36: }\\n37: \\n38: const (\\n39: \\t// ContainerStarted - event type when the new state of container is running.\\n40: \\tContainerStarted PodLifeCycleEventType = \\"ContainerStarted\\"\\n41: \\t// ContainerDied - event type when the new state of container is exited.\\n42: \\tContainerDied PodLifeCycleEventType = \\"ContainerDied\\"\\n43: \\t// ContainerRemoved - event type when the old state of container is exited.\\n44: \\tContainerRemoved PodLifeCycleEventType = \\"ContainerRemoved\\"\\n45: \\t// PodSync is used to trigger syncing of a pod when the observed change of\\n46: \\t// the state of the pod cannot be captured by any single event above.\\n47: \\tPodSync PodLifeCycleEventType = \\"PodSync\\"\\n48: \\t// ContainerChanged - event type when the new state of container is unknown.\\n49: \\tContainerChanged PodLifeCycleEventType = \\"ContainerChanged\\"\\n50: \\t// ConditionMet - event type triggered when any number of watch conditions are met.\\n51: \\tConditionMet PodLifeCycleEventType = \\"ConditionMet\\"\\n52: )\\n53: \\n54: // PodLifecycleEvent is an event that reflects the change of the pod state.\\n55: type PodLifecycleEvent struct {\\n56: \\t// The pod ID.\\n57: \\tID types.UID\\n58: \\t// The type of the event.\\n59: \\tType PodLifeCycleEventType\\n60: \\t// The accompanied data which varies based on the event type.\\n61: \\t// - ContainerStarted/ContainerStopped: the container name (string).\\n62: \\t// - All other event types: unused.\\n63: \\tData interface{}\\n64: }\\n65: \\n66: // PodLifecycleEventGenerator contains functions for generating pod life cycle events.\\n67: type PodLifecycleEventGenerator interface {\\n68: \\tStart()\\n69: \\tWatch() chan *PodLifecycleEvent\\n70: \\tHealthy() (bool, error)\\n71: \\t// SetPodWatchCondition flags the pod for reinspection on every Relist iteration until the watch\\n72: \\t// condition is met. The condition is keyed so it can be updated before the condition\\n73: \\t// is met.\\n74: \\tSetPodWatchCondition(podUID types.UID, conditionKey string, condition WatchCondition)\\n75: }\\n76: \\n77: // podLifecycleEventGeneratorHandler contains functions that are useful for different PLEGs\\n78: // and need not be exposed to rest of the kubelet\\n79: type podLifecycleEventGeneratorHandler interface {\\n80: \\tPodLifecycleEventGenerator\\n81: \\tStop()\\n82: \\tUpdate(relistDuration *RelistDuration)\\n83: \\tRelist()\\n84: }\\n85: \\n86: // WatchCondition take...15. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/cm/devicemanager/manager.go",
"startLine": 1,
"endLine": 80
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/cm/devicemanager/manager.go%3FL1-80\\n1: /*\\n2: Copyright 2017 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package devicemanager\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\tgoerrors \\"errors\\"\\n22: \\t\\"fmt\\"\\n23: \\t\\"os\\"\\n24: \\t\\"path/filepath\\"\\n25: \\t\\"runtime\\"\\n26: \\t\\"sort\\"\\n27: \\t\\"sync\\"\\n28: \\t\\"time\\"\\n29: \\n30: \\tcadvisorapi \\"github.com/google/cadvisor/info/v1\\"\\n31: \\t\\"k8s.io/klog/v2\\"\\n32: \\n33: \\tv1 \\"k8s.io/api/core/v1\\"\\n34: \\t\\"k8s.io/apimachinery/pkg/api/resource\\"\\n35: \\terrorsutil \\"k8s.io/apimachinery/pkg/util/errors\\"\\n36: \\t\\"k8s.io/apimachinery/pkg/util/sets\\"\\n37: \\t\\"k8s.io/apiserver/pkg/server/healthz\\"\\n38: \\tutilfeature \\"k8s.io/apiserver/pkg/util/feature\\"\\n39: \\tpluginapi \\"k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1\\"\\n40: \\tpodutil \\"k8s.io/kubernetes/pkg/api/v1/pod\\"\\n41: \\t\\"k8s.io/kubernetes/pkg/features\\"\\n42: \\t\\"k8s.io/kubernetes/pkg/kubelet/checkpointmanager\\"\\n43: \\t\\"k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors\\"\\n44: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm/containermap\\"\\n45: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/checkpoint\\"\\n46: \\tplugin \\"k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/plugin/v1beta1\\"\\n47: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm/resourceupdates\\"\\n48: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm/topologymanager\\"\\n49: \\t\\"k8s.io/kubernetes/pkg/kubelet/config\\"\\n50: \\t\\"k8s.io/kubernetes/pkg/kubelet/lifecycle\\"\\n51: \\t\\"k8s.io/kubernetes/pkg/kubelet/metrics\\"\\n52: \\t\\"k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache\\"\\n53: \\tschedulerframework \\"k8s.io/kubernetes/pkg/scheduler/framework\\"\\n54: )\\n55: \\n56: const nodeWithoutTopology = -1\\n57: \\n58: // ActivePodsFunc is a function that returns a list of pods to reconcile.\\n59: type ActivePodsFunc func() []*v1.Pod\\n60: \\n61: // ManagerImpl is the structure in charge of managing Device Plugins.\\n62: type ManagerImpl struct {\\n63: \\tcheckpointdir string\\n64: \\n65: \\tendpoints map[string]endpointInfo // Key is ResourceName\\n66: \\tmutex sync.Mutex\\n67: \\n68: \\tserver plugin.Server\\n69: \\n70: \\t// activePods is a method for listing active pods on the node\\n71: \\t// so the amount of pluginResources requested by existing pods\\n72: \\t// could be counted when updating allocated devices\\n73: \\tactivePods ActivePodsFunc\\n74: \\n75: \\t// sourcesReady provides the readiness of kubelet configuration sources such as apiserver update readiness.\\n76: \\t// We use it to determine when we can purge inactive pods from checkpointed state.\\n77: \\tsourcesReady config.SourcesReady\\n78: \\n79: \\t// allDevices holds all the devices currently registered to the device manager\\n80: \\tallDevices ResourceDeviceInstances\\n81: "}', 'structuredContent': {'text': 'URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/cm/devicemanager/manager.go%3FL1-80\n1: /*\n2: Copyright 2017 The Kubernetes Authors.\n3: \n4: Licensed under the Apache License, Version 2.0 (the "License");\n5: you may not use this file except in compliance with the License.\n6: Y...16. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:pkg/kubelet/kuberuntime remoteRuntimeService OR RemoteRuntime"
}Output
{'content': '{"text":"No results.\\n\\nNo results found."}', 'structuredContent': {'text': 'No results.\n\nNo results found.'}}17. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ file:vendor/k8s.io/cri-client RemoteRuntimeService"
}Output
{'content': '{"text":"No results.\\n\\nNo results found."}', 'structuredContent': {'text': 'No results.\n\nNo results found.'}}18. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/lifecycle/handlers.go",
"startLine": 1,
"endLine": 60
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/lifecycle/handlers.go%3FL1-60\\n1: /*\\n2: Copyright 2014 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package lifecycle\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"errors\\"\\n22: \\t\\"fmt\\"\\n23: \\t\\"io\\"\\n24: \\t\\"net/http\\"\\n25: \\t\\"net/url\\"\\n26: \\t\\"strconv\\"\\n27: \\t\\"strings\\"\\n28: \\t\\"time\\"\\n29: \\n30: \\tv1 \\"k8s.io/api/core/v1\\"\\n31: \\t\\"k8s.io/apimachinery/pkg/types\\"\\n32: \\t\\"k8s.io/apimachinery/pkg/util/intstr\\"\\n33: \\tutilfeature \\"k8s.io/apiserver/pkg/util/feature\\"\\n34: \\t\\"k8s.io/client-go/tools/record\\"\\n35: \\t\\"k8s.io/klog/v2\\"\\n36: \\t\\"k8s.io/kubernetes/pkg/features\\"\\n37: \\tkubecontainer \\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n38: \\t\\"k8s.io/kubernetes/pkg/kubelet/metrics\\"\\n39: \\tkubetypes \\"k8s.io/kubernetes/pkg/kubelet/types\\"\\n40: \\t\\"k8s.io/kubernetes/pkg/kubelet/util/format\\"\\n41: \\thttpprobe \\"k8s.io/kubernetes/pkg/probe/http\\"\\n42: \\t\\"k8s.io/kubernetes/pkg/security/apparmor\\"\\n43: )\\n44: \\n45: const (\\n46: \\tmaxRespBodyLength = 10 * 1 << 10 // 10KB\\n47: \\n48: \\tAppArmorNotAdmittedReason = \\"AppArmor\\"\\n49: )\\n50: \\n51: type handlerRunner struct {\\n52: \\thttpDoer kubetypes.HTTPDoer\\n53: \\tcommandRunner kubecontainer.CommandRunner\\n54: \\tcontainerManager podStatusProvider\\n55: \\teventRecorder record.EventRecorder\\n56: }\\n57: \\n58: type podStatusProvider interface {\\n59: \\tGetPodStatus(ctx context.Context, uid types.UID, name, namespace string) (*kubecontainer.PodStatus, error)\\n60: }\\n61: "}', 'structuredContent': {'text': 'URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/lifecycle/handlers.go%3FL1-60\n1: /*\n2: Copyright 2014 The Kubernetes Authors.\n3: \n4: Licensed under the Apache License, Version 2.0 (the "License");\n5: you may not use this file except in compliance with the License.\n6: You may obtain a copy of the License at\n7: \n8: http://www.apache.org/licenses/LICENSE-2.0\n9: \n10: Unless required by applicable law or agreed to in writing, software\n11: distributed under the License is distributed on an "AS IS" BASIS,\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n13: See the License for the specific language governing permissions and\n14: limitations under the License.\n15: */\n16: \n17: package lifecycle\n18: \n19: import (\n20: \t"context"\n21: \t"errors"\n22: \t"fmt"\n23: \t"io"\n24: \t"net/http"\n25: \t"net/url"\n26: \t"strconv"\n27: \t"strings"\n28: \t"time"\n29: \n30: \tv1 "k8s.io/api/core/v1"\n31: \t"k8s.io/apimachinery/pkg/types"\n32: \t"k8s.io/apimachinery/pkg/util/intstr"\n33: \tutilfeature "k8s.io/apiserver/pkg/util/feature"\n34: \t"k8s.io/client-go/tools/record"\n35: \t"k8s.io/klog/v2"\n36: \t"k8s.io/kubernetes/pkg/features"\n37: \tkubecontainer "k8s.io/kubernetes/pkg/kubelet/container"\n38: \t"k8s.io/kubernetes/pkg/kubelet/metrics"\n39: \tkubetypes "k8s.io/kubernetes/pkg/kubelet/types"\n40: \t"k8s.io/kubernetes/pkg/kubelet/util/format"\n41: \thttpprobe "k8s.io/kubernetes/pkg/probe/http"\n42: \t"k8s.io/kubernetes/pkg/security/apparmor"\n43: )\n44: \n45: const (\n46: \tmaxRespBodyLen...19. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/pleg/generic.go",
"startLine": 1,
"endLine": 80
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/pleg/generic.go%3FL1-80\\n1: /*\\n2: Copyright 2015 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package pleg\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"fmt\\"\\n22: \\t\\"sync\\"\\n23: \\t\\"sync/atomic\\"\\n24: \\t\\"time\\"\\n25: \\n26: \\t\\"k8s.io/apimachinery/pkg/types\\"\\n27: \\t\\"k8s.io/apimachinery/pkg/util/sets\\"\\n28: \\t\\"k8s.io/apimachinery/pkg/util/wait\\"\\n29: \\tutilfeature \\"k8s.io/apiserver/pkg/util/feature\\"\\n30: \\truntimeapi \\"k8s.io/cri-api/pkg/apis/runtime/v1\\"\\n31: \\t\\"k8s.io/klog/v2\\"\\n32: \\t\\"k8s.io/kubernetes/pkg/features\\"\\n33: \\tkubecontainer \\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n34: \\t\\"k8s.io/kubernetes/pkg/kubelet/metrics\\"\\n35: \\t\\"k8s.io/utils/clock\\"\\n36: )\\n37: \\n38: // GenericPLEG is an extremely simple generic PLEG that relies solely on\\n39: // periodic listing to discover container changes. It should be used\\n40: // as temporary replacement for container runtimes do not support a proper\\n41: // event generator yet.\\n42: //\\n43: // Note that GenericPLEG assumes that a container would not be created,\\n44: // terminated, and garbage collected within one relist period. If such an\\n45: // incident happens, GenenricPLEG would miss all events regarding this\\n46: // container. In the case of relisting failure, the window may become longer.\\n47: // Note that this assumption is not unique -- many kubelet internal components\\n48: // rely on terminated containers as tombstones for bookkeeping purposes. The\\n49: // garbage collector is implemented to work with such situations. However, to\\n50: // guarantee that kubelet can handle missing container events, it is\\n51: // recommended to set the relist period short and have an auxiliary, longer\\n52: // periodic sync in kubelet as the safety net.\\n53: type GenericPLEG struct {\\n54: \\t// The container runtime.\\n55: \\truntime kubecontainer.Runtime\\n56: \\t// The channel from which the subscriber listens events.\\n57: \\teventChannel chan *PodLifecycleEvent\\n58: \\t// The internal cache for pod/container information.\\n59: \\tpodRecords podRecords\\n60: \\t// Time of the last relisting.\\n61: \\trelistTime atomic.Value\\n62: \\t// Cache for storing the runtime states required for syncing pods.\\n63: \\tcache kubecontainer.Cache\\n64: \\t// For testability.\\n65: \\tclock clock.Clock\\n66: \\t// Pods that failed to have their status retrieved during a relist. These pods will be\\n67: \\t// retried during the next relisting.\\n68: \\tpodsToReinspect map[types.UID]*kubecontainer.Pod\\n69: \\t// Stop the Generic PLEG by closing the channel.\\n70: \\tstopCh chan struct{}\\n71: \\t// Locks the relisting of the Generic PLEG\\n72: \\trelistLock sync.Mutex\\n73: \\t// Indicates if the Generic PLEG is running or not\\n74: \\tisRunning bool\\n75: \\t// Locks the start/stop operation of Generic PLEG\\n76: \\trunningMu sync.Mutex\\n77: \\t// Indicates relisting related parameters\\n78: \\trelistDuration *RelistDuration\\n79: \\t// Mutex to serialize updateCache called by relist vs UpdateCache interface\\n80: \\tpodCacheMutex sync.Mutex\\n81: "}', 'structuredContent': {'text': 'URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c...20. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/volumemanager/volume_manager.go",
"startLine": 1,
"endLine": 100
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/volumemanager/volume_manager.go%3FL1-100\\n1: /*\\n2: Copyright 2016 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package volumemanager\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"errors\\"\\n22: \\t\\"fmt\\"\\n23: \\t\\"slices\\"\\n24: \\t\\"strconv\\"\\n25: \\t\\"strings\\"\\n26: \\t\\"sync\\"\\n27: \\t\\"time\\"\\n28: \\n29: \\tutilfeature \\"k8s.io/apiserver/pkg/util/feature\\"\\n30: \\t\\"k8s.io/klog/v2\\"\\n31: \\t\\"k8s.io/mount-utils\\"\\n32: \\n33: \\tv1 \\"k8s.io/api/core/v1\\"\\n34: \\tk8stypes \\"k8s.io/apimachinery/pkg/types\\"\\n35: \\tutilerrors \\"k8s.io/apimachinery/pkg/util/errors\\"\\n36: \\t\\"k8s.io/apimachinery/pkg/util/runtime\\"\\n37: \\t\\"k8s.io/apimachinery/pkg/util/sets\\"\\n38: \\t\\"k8s.io/apimachinery/pkg/util/wait\\"\\n39: \\tclientset \\"k8s.io/client-go/kubernetes\\"\\n40: \\t\\"k8s.io/client-go/tools/record\\"\\n41: \\tcsitrans \\"k8s.io/csi-translation-lib\\"\\n42: \\t\\"k8s.io/kubernetes/pkg/kubelet/config\\"\\n43: \\t\\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n44: \\t\\"k8s.io/kubernetes/pkg/kubelet/volumemanager/cache\\"\\n45: \\t\\"k8s.io/kubernetes/pkg/kubelet/volumemanager/metrics\\"\\n46: \\t\\"k8s.io/kubernetes/pkg/kubelet/volumemanager/populator\\"\\n47: \\t\\"k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler\\"\\n48: \\t\\"k8s.io/kubernetes/pkg/volume\\"\\n49: \\t\\"k8s.io/kubernetes/pkg/volume/csimigration\\"\\n50: \\t\\"k8s.io/kubernetes/pkg/volume/util\\"\\n51: \\t\\"k8s.io/kubernetes/pkg/volume/util/hostutil\\"\\n52: \\t\\"k8s.io/kubernetes/pkg/volume/util/operationexecutor\\"\\n53: \\t\\"k8s.io/kubernetes/pkg/volume/util/types\\"\\n54: \\t\\"k8s.io/kubernetes/pkg/volume/util/volumepathhandler\\"\\n55: )\\n56: \\n57: const (\\n58: \\t// reconcilerLoopSleepPeriod is the amount of time the reconciler loop waits\\n59: \\t// between successive executions\\n60: \\treconcilerLoopSleepPeriod = 100 * time.Millisecond\\n61: \\n62: \\t// desiredStateOfWorldPopulatorLoopSleepPeriod is the amount of time the\\n63: \\t// DesiredStateOfWorldPopulator loop waits between successive executions\\n64: \\tdesiredStateOfWorldPopulatorLoopSleepPeriod = 100 * time.Millisecond\\n65: \\n66: \\t// podAttachAndMountTimeout is the maximum amount of time the\\n67: \\t// WaitForAttachAndMount call will wait for all volumes in the specified pod\\n68: \\t// to be attached and mounted. Even though cloud operations can take several\\n69: \\t// minutes to complete, we set the timeout to 2 minutes because kubelet\\n70: \\t// will retry in the next sync iteration. This frees the associated\\n71: \\t// goroutine of the pod to process newer updates if needed (e.g., a delete\\n72: \\t// request to the pod).\\n73: \\t// Value is slightly offset from 2 minutes to make timeouts due to this\\n74: \\t// constant recognizable.\\n75: \\tpodAttachAndMountTimeout = 2*time.Minute + 3*time.Second\\n76: \\n77: \\t// podAttachAndMountRetryInterval is the amount of time the GetVolumesForPod\\n78: \\t// call waits before retrying\\n79: \\tpodAttachAndMountRetryInterval = 300 * time.Millisecond\\n80: \\n81: \\t// waitForAttachTimeout is the maximum amount of time a\\n82: \\t// operationexecutor.Mount call will wait for a volume to be attached.\\n83: \\t// Set to 10 minut...21. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ RemoteRuntimeService file:vendor"
}Output
{'content': '{"text":"No results.\\n\\nNo results found."}', 'structuredContent': {'text': 'No results.\n\nNo results found.'}}22. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/kuberuntime/kuberuntime_manager.go",
"startLine": 1,
"endLine": 100
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/kuberuntime/kuberuntime_manager.go%3FL1-100\\n1: /*\\n2: Copyright 2016 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package kuberuntime\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"errors\\"\\n22: \\t\\"fmt\\"\\n23: \\t\\"os\\"\\n24: \\t\\"path/filepath\\"\\n25: \\t\\"sort\\"\\n26: \\t\\"time\\"\\n27: \\n28: \\tcadvisorapi \\"github.com/google/cadvisor/info/v1\\"\\n29: \\t\\"go.opentelemetry.io/otel/trace\\"\\n30: \\tgrpcstatus \\"google.golang.org/grpc/status\\"\\n31: \\tcrierror \\"k8s.io/cri-api/pkg/errors\\"\\n32: \\t\\"k8s.io/klog/v2\\"\\n33: \\n34: \\tv1 \\"k8s.io/api/core/v1\\"\\n35: \\t\\"k8s.io/apimachinery/pkg/api/resource\\"\\n36: \\tmetav1 \\"k8s.io/apimachinery/pkg/apis/meta/v1\\"\\n37: \\tkubetypes \\"k8s.io/apimachinery/pkg/types\\"\\n38: \\tutilruntime \\"k8s.io/apimachinery/pkg/util/runtime\\"\\n39: \\tutilversion \\"k8s.io/apimachinery/pkg/util/version\\"\\n40: \\tutilfeature \\"k8s.io/apiserver/pkg/util/feature\\"\\n41: \\t\\"k8s.io/client-go/tools/record\\"\\n42: \\tref \\"k8s.io/client-go/tools/reference\\"\\n43: \\t\\"k8s.io/client-go/util/flowcontrol\\"\\n44: \\t\\"k8s.io/component-base/logs/logreduction\\"\\n45: \\tinternalapi \\"k8s.io/cri-api/pkg/apis\\"\\n46: \\truntimeapi \\"k8s.io/cri-api/pkg/apis/runtime/v1\\"\\n47: \\n48: \\t\\"k8s.io/kubernetes/pkg/api/legacyscheme\\"\\n49: \\tpodutil \\"k8s.io/kubernetes/pkg/api/v1/pod\\"\\n50: \\t\\"k8s.io/kubernetes/pkg/credentialprovider\\"\\n51: \\t\\"k8s.io/kubernetes/pkg/credentialprovider/plugin\\"\\n52: \\t\\"k8s.io/kubernetes/pkg/features\\"\\n53: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm\\"\\n54: \\tkubecontainer \\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n55: \\t\\"k8s.io/kubernetes/pkg/kubelet/events\\"\\n56: \\t\\"k8s.io/kubernetes/pkg/kubelet/images\\"\\n57: \\truntimeutil \\"k8s.io/kubernetes/pkg/kubelet/kuberuntime/util\\"\\n58: \\t\\"k8s.io/kubernetes/pkg/kubelet/lifecycle\\"\\n59: \\t\\"k8s.io/kubernetes/pkg/kubelet/logs\\"\\n60: \\t\\"k8s.io/kubernetes/pkg/kubelet/metrics\\"\\n61: \\t\\"k8s.io/kubernetes/pkg/kubelet/pleg\\"\\n62: \\tproberesults \\"k8s.io/kubernetes/pkg/kubelet/prober/results\\"\\n63: \\t\\"k8s.io/kubernetes/pkg/kubelet/runtimeclass\\"\\n64: \\t\\"k8s.io/kubernetes/pkg/kubelet/sysctl\\"\\n65: \\t\\"k8s.io/kubernetes/pkg/kubelet/types\\"\\n66: \\t\\"k8s.io/kubernetes/pkg/kubelet/util/cache\\"\\n67: \\t\\"k8s.io/kubernetes/pkg/kubelet/util/format\\"\\n68: \\tsc \\"k8s.io/kubernetes/pkg/securitycontext\\"\\n69: )\\n70: \\n71: const (\\n72: \\t// The api version of kubelet runtime api\\n73: \\tkubeRuntimeAPIVersion = \\"0.1.0\\"\\n74: \\t// A minimal shutdown window for avoiding unnecessary SIGKILLs\\n75: \\tminimumGracePeriodInSeconds = 2\\n76: \\n77: \\t// The expiration time of version cache.\\n78: \\tversionCacheTTL = 60 * time.Second\\n79: \\t// How frequently to report identical errors\\n80: \\tidenticalErrorDelay = 1 * time.Minute\\n81: \\t// OpenTelemetry instrumentation scope name\\n82: \\tinstrumentationScope = \\"k8s.io/kubernetes/pkg/kubelet/kuberuntime\\"\\n83: )\\n84: \\n85: var (\\n86: \\t// ErrVersionNotSupported is returned when the api version of runtime interface is not supported\\n87: \\tErrVersionNotSupported = errors.New(\\"runtime api version is not sup...23. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/pod_workers.go",
"startLine": 1,
"endLine": 100
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/pod_workers.go%3FL1-100\\n1: /*\\n2: Copyright 2014 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package kubelet\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"fmt\\"\\n22: \\t\\"strings\\"\\n23: \\t\\"sync\\"\\n24: \\t\\"time\\"\\n25: \\n26: \\tv1 \\"k8s.io/api/core/v1\\"\\n27: \\t\\"k8s.io/apimachinery/pkg/types\\"\\n28: \\t\\"k8s.io/apimachinery/pkg/util/runtime\\"\\n29: \\t\\"k8s.io/apimachinery/pkg/util/wait\\"\\n30: \\t\\"k8s.io/client-go/tools/record\\"\\n31: \\truntimeapi \\"k8s.io/cri-api/pkg/apis/runtime/v1\\"\\n32: \\t\\"k8s.io/klog/v2\\"\\n33: \\tkubecontainer \\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n34: \\t\\"k8s.io/kubernetes/pkg/kubelet/events\\"\\n35: \\t\\"k8s.io/kubernetes/pkg/kubelet/eviction\\"\\n36: \\t\\"k8s.io/kubernetes/pkg/kubelet/metrics\\"\\n37: \\tkubetypes \\"k8s.io/kubernetes/pkg/kubelet/types\\"\\n38: \\t\\"k8s.io/kubernetes/pkg/kubelet/util/queue\\"\\n39: \\t\\"k8s.io/utils/clock\\"\\n40: )\\n41: \\n42: // OnCompleteFunc is a function that is invoked when an operation completes.\\n43: // If err is non-nil, the operation did not complete successfully.\\n44: type OnCompleteFunc func(err error)\\n45: \\n46: // PodStatusFunc is a function that is invoked to override the pod status when a pod is killed.\\n47: type PodStatusFunc func(podStatus *v1.PodStatus)\\n48: \\n49: // KillPodOptions are options when performing a pod update whose update type is kill.\\n50: type KillPodOptions struct {\\n51: \\t// CompletedCh is closed when the kill request completes (syncTerminatingPod has completed\\n52: \\t// without error) or if the pod does not exist, or if the pod has already terminated. This\\n53: \\t// could take an arbitrary amount of time to be closed, but is never left open once\\n54: \\t// CouldHaveRunningContainers() returns false.\\n55: \\tCompletedCh chan<- struct{}\\n56: \\t// Evict is true if this is a pod triggered eviction - once a pod is evicted some resources are\\n57: \\t// more aggressively reaped than during normal pod operation (stopped containers).\\n58: \\tEvict bool\\n59: \\t// PodStatusFunc is invoked (if set) and overrides the status of the pod at the time the pod is killed.\\n60: \\t// The provided status is populated from the latest state.\\n61: \\tPodStatusFunc PodStatusFunc\\n62: \\t// PodTerminationGracePeriodSecondsOverride is optional override to use if a pod is being killed as part of kill operation.\\n63: \\tPodTerminationGracePeriodSecondsOverride *int64\\n64: }\\n65: \\n66: // UpdatePodOptions is an options struct to pass to a UpdatePod operation.\\n67: type UpdatePodOptions struct {\\n68: \\t// The type of update (create, update, sync, kill).\\n69: \\tUpdateType kubetypes.SyncPodType\\n70: \\t// StartTime is an optional timestamp for when this update was created. If set,\\n71: \\t// when this update is fully realized by the pod worker it will be recorded in\\n72: \\t// the PodWorkerDuration metric.\\n73: \\tStartTime time.Time\\n74: \\t// Pod to update. Required.\\n75: \\tPod *v1.Pod\\n76: \\t// MirrorPod is the mirror pod if Pod is a static pod. Optional when UpdateType\\n77: \\t// is kill or terminated.\\n78: \\tMirrorPod *v1.Pod\\n79: \\t// RunningPod is a runtime pod that is no longer present in config. Required...24. mcp__sourcegraph__sg_list_files
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "vendor/k8s.io/cri-client/pkg"
}Output
{'content': '{"text":"No files."}', 'structuredContent': {'text': 'No files.'}}25. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ NewRemoteRuntimeService file:pkg/kubelet"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet.go\\n371: \\tlogger := klog.Background()\\n372: \\tif kubeDeps.RemoteRuntimeService, err = remote.NewRemoteRuntimeService(kubeCfg.ContainerRuntimeEndpoint, kubeCfg.RuntimeRequestTimeout.Duration, tp, &logger); err != nil {\\n373: \\t\\treturn err\\n374: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet_test.go\\n3215: \\tlogger := klog.Background()\\n3216: \\truntimeService, err := remote.NewRemoteRuntimeService(endpoint, 15*time.Second, tp, &logger)\\n3217: \\trequire.NoError(t, err)\\n3218: \\n"}', 'structuredContent': {'text': '# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet.go\n371: \tlogger := klog.Background()\n372: \tif kubeDeps.RemoteRuntimeService, err = remote.NewRemoteRuntimeService(kubeCfg.ContainerRuntimeEndpoint, kubeCfg.RuntimeRequestTimeout.Duration, tp, &logger); err != nil {\n373: \t\treturn err\n374: \n\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet_test.go\n3215: \tlogger := klog.Background()\n3216: \truntimeService, err := remote.NewRemoteRuntimeService(endpoint, 15*time.Second, tp, &logger)\n3217: \trequire.NoError(t, err)\n3218: \n'}}26. mcp__sourcegraph__sg_list_files
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "vendor/k8s.io/cri-client"
}Output
{'content': '{"text":"No files."}', 'structuredContent': {'text': 'No files.'}}27. mcp__sourcegraph__sg_keyword_search
Input
{
"query": "repo:^github.com/sg-evals/kubernetes--v1.32.0$ NewRemoteRuntimeService RemoteRuntimeService struct"
}Output
{'content': '{"text":"# github.com/sg-evals/kubernetes--v1.32.0 – cmd/kubeadm/app/util/runtime/runtime_fake_test.go\\n39: \\t}\\n40: \\tnewRemoteRuntimeServiceReturns struct {\\n41: \\t\\tres cri.RuntimeService\\n42: \\n100: \\n101: func (fake *fakeImpl) NewRemoteRuntimeServiceReturns(res cri.RuntimeService, err error) {\\n102: \\tfake.newRemoteRuntimeServiceReturns = struct {\\n103: \\t\\tres cri.RuntimeService\\n104: \\n95: \\n96: func (fake *fakeImpl) NewRemoteRuntimeService(string, time.Duration) (cri.RuntimeService, error) {\\n97: \\tfakeReturns := fake.newRemoteRuntimeServiceReturns\\n98: \\treturn fakeReturns.res, fakeReturns.err\\n99: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – staging/src/k8s.io/cri-client/pkg/remote_runtime.go\\n45: \\n46: // remoteRuntimeService is a gRPC implementation of internalapi.RuntimeService.\\n47: type remoteRuntimeService struct {\\n48: \\ttimeout time.Duration\\n49: \\n81: \\n82: // NewRemoteRuntimeService creates a new internalapi.RuntimeService.\\n83: func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration, tp trace.TracerProvider, logger *klog.Logger) (internalapi.RuntimeService, error) {\\n84: \\tinternal.Log(logger, 3, \\"Connecting to runtime service\\", \\"endpoint\\", endpoint)\\n85: \\n126: \\n127: \\tservice := &remoteRuntimeService{\\n128: \\t\\ttimeout: connectionTimeout,\\n129: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – cmd/kubeadm/app/util/runtime/impl.go\\n30: type impl interface {\\n31: \\tNewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (criapi.RuntimeService, error)\\n32: \\tNewRemoteImageService(endpoint string, connectionTimeout time.Duration) (criapi.ImageManagerService, error)\\n33: \\n40: \\n41: func (*defaultImpl) NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (criapi.RuntimeService, error) {\\n42: \\treturn criclient.NewRemoteRuntimeService(endpoint, defaultTimeout, nil, nil)\\n43: }\\n44: \\n27: \\n28: type defaultImpl struct{}\\n29: \\n30: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – cmd/kubeadm/app/util/runtime/runtime.go\\n286: \\n287: \\ttype config struct {\\n288: \\t\\tSandboxImage string `json:\\"sandboxImage,omitempty\\"`\\n289: \\n54: \\n55: // CRIRuntime is a struct that interfaces with the CRI\\n56: type CRIRuntime struct {\\n57: \\timpl impl\\n58: \\n65: \\n66: // NewContainerRuntime sets up and returns a ContainerRuntime struct\\n67: func NewContainerRuntime(criSocket string) ContainerRuntime {\\n68: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – cmd/kubemark/app/hollow_node.go\\n55: \\n56: type hollowNodeConfig struct {\\n57: \\tKubeconfigPath string\\n58: \\n250: \\t\\tlogger := klog.Background()\\n251: \\t\\truntimeService, err := remote.NewRemoteRuntimeService(endpoint, 15*time.Second, noop.NewTracerProvider(), &logger)\\n252: \\t\\tif err != nil {\\n253: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – pkg/kubelet/kubelet.go\\n312: \\tTLSOptions *server.TLSOptions\\n313: \\tRemoteRuntimeService internalapi.RuntimeService\\n314: \\tRemoteImageService internalapi.ImageManagerService\\n315: \\n371: \\tlogger := klog.Background()\\n372: \\tif kubeDeps.RemoteRuntimeService, err = remote.NewRemoteRuntimeService(kubeCfg.ContainerRuntimeEndpoint, kubeCfg.RuntimeRequestTimeout.Duration, tp, &logger); err != nil {\\n373: \\t\\treturn err\\n374: \\n1040: // Kubelet is the main kubelet implementation.\\n1041: type Kubelet struct {\\n1042: \\tkubeletConfiguration kubeletconfiginternal.KubeletConfiguration\\n1043: \\n\\n# github.com/sg-evals/kubernetes--v1.32.0 – cmd/kubeadm/app/util/runtime/runtime_test.go\\n359: \\tconst tempPrefix = \\"test.kubeadm.runtime.isExistingSocket.\\"\\n360: \\ttests := []struct {\\n361: \\t\\tname string\\n362: \\n418: func TestDetectCRISocketImpl(t *testing.T) {\\n419: \\ttests := []struct {\\n420: \\t\\tname string\\n421: \\n35: func TestNewContainerRuntime(t *testin...28. mcp__sourcegraph__sg_list_files
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "staging/src/k8s.io/cri-client/pkg"
}Output
{'content': '{"text":"staging/src/k8s.io/cri-client/pkg/fake/\\nstaging/src/k8s.io/cri-client/pkg/internal/\\nstaging/src/k8s.io/cri-client/pkg/logs/\\nstaging/src/k8s.io/cri-client/pkg/util/\\nstaging/src/k8s.io/cri-client/pkg/doc.go\\nstaging/src/k8s.io/cri-client/pkg/remote_image.go\\nstaging/src/k8s.io/cri-client/pkg/remote_image_test.go\\nstaging/src/k8s.io/cri-client/pkg/remote_runtime.go\\nstaging/src/k8s.io/cri-client/pkg/remote_runtime_test.go\\nstaging/src/k8s.io/cri-client/pkg/utils.go\\nstaging/src/k8s.io/cri-client/pkg/utils_test.go\\n"}', 'structuredContent': {'text': 'staging/src/k8s.io/cri-client/pkg/fake/\nstaging/src/k8s.io/cri-client/pkg/internal/\nstaging/src/k8s.io/cri-client/pkg/logs/\nstaging/src/k8s.io/cri-client/pkg/util/\nstaging/src/k8s.io/cri-client/pkg/doc.go\nstaging/src/k8s.io/cri-client/pkg/remote_image.go\nstaging/src/k8s.io/cri-client/pkg/remote_image_test.go\nstaging/src/k8s.io/cri-client/pkg/remote_runtime.go\nstaging/src/k8s.io/cri-client/pkg/remote_runtime_test.go\nstaging/src/k8s.io/cri-client/pkg/utils.go\nstaging/src/k8s.io/cri-client/pkg/utils_test.go\n'}}29. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "staging/src/k8s.io/cri-client/pkg/remote_runtime.go",
"startLine": 1,
"endLine": 80
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/staging/src/k8s.io/cri-client/pkg/remote_runtime.go%3FL1-80\\n1: /*\\n2: Copyright 2016 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package cri\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"errors\\"\\n22: \\t\\"fmt\\"\\n23: \\t\\"io\\"\\n24: \\t\\"strings\\"\\n25: \\t\\"time\\"\\n26: \\n27: \\t\\"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc\\"\\n28: \\t\\"go.opentelemetry.io/otel/trace\\"\\n29: \\t\\"google.golang.org/grpc\\"\\n30: \\t\\"google.golang.org/grpc/backoff\\"\\n31: \\t\\"google.golang.org/grpc/codes\\"\\n32: \\t\\"google.golang.org/grpc/credentials/insecure\\"\\n33: \\t\\"google.golang.org/grpc/status\\"\\n34: \\n35: \\t\\"k8s.io/component-base/logs/logreduction\\"\\n36: \\ttracing \\"k8s.io/component-base/tracing\\"\\n37: \\tinternalapi \\"k8s.io/cri-api/pkg/apis\\"\\n38: \\truntimeapi \\"k8s.io/cri-api/pkg/apis/runtime/v1\\"\\n39: \\t\\"k8s.io/klog/v2\\"\\n40: \\tutilexec \\"k8s.io/utils/exec\\"\\n41: \\n42: \\t\\"k8s.io/cri-client/pkg/internal\\"\\n43: \\t\\"k8s.io/cri-client/pkg/util\\"\\n44: )\\n45: \\n46: // remoteRuntimeService is a gRPC implementation of internalapi.RuntimeService.\\n47: type remoteRuntimeService struct {\\n48: \\ttimeout time.Duration\\n49: \\truntimeClient runtimeapi.RuntimeServiceClient\\n50: \\t// Cache last per-container error message to reduce log spam\\n51: \\tlogReduction *logreduction.LogReduction\\n52: \\tlogger *klog.Logger\\n53: }\\n54: \\n55: const (\\n56: \\t// How frequently to report identical errors\\n57: \\tidenticalErrorDelay = 1 * time.Minute\\n58: \\n59: \\t// connection parameters\\n60: \\tmaxBackoffDelay = 3 * time.Second\\n61: \\tbaseBackoffDelay = 100 * time.Millisecond\\n62: \\tminConnectionTimeout = 5 * time.Second\\n63: )\\n64: \\n65: // CRIVersion is the type for valid Container Runtime Interface (CRI) API\\n66: // versions.\\n67: type CRIVersion string\\n68: \\n69: var (\\n70: \\t// ErrContainerStatusNil indicates that the returned container status is nil.\\n71: \\tErrContainerStatusNil = errors.New(\\"container status is nil\\")\\n72: \\n73: \\t// ErrCommandTimedOut indicates that the exec sync command timed.\\n74: \\tErrCommandTimedOut = errors.New(\\"command timed out\\")\\n75: )\\n76: \\n77: const (\\n78: \\t// CRIVersionV1 references the v1 CRI API.\\n79: \\tCRIVersionV1 CRIVersion = \\"v1\\"\\n80: )\\n81: "}', 'structuredContent': {'text': 'URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/staging/src/k8s.io/cri-client/pkg/remote_runtime.go%3FL1-80\n1: /*\n2: Copyright 2016 The Kubernetes Authors.\n3: \n4: Licensed under the Apache License, Version 2.0 (the "License");\n5: you may not use this file except in compliance with the License.\n6: You may obtain a copy of the License at\n7: \n8: http://www.apache.org/licenses/LICENSE-2.0\n9: \n10: Unless required by applicable law or agreed to in writing, software\n11: distributed under the License is distributed on an "AS IS" BASIS,\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n13: See the License for the specific language governing permissions and\n14: limitations under the License.\n15: */\n16: \n17: package c...30. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/cm/devicemanager/types.go"
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/cm/devicemanager/types.go\\n1: /*\\n2: Copyright 2017 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package devicemanager\\n18: \\n19: import (\\n20: \\t\\"time\\"\\n21: \\n22: \\tv1 \\"k8s.io/api/core/v1\\"\\n23: \\t\\"k8s.io/apimachinery/pkg/util/sets\\"\\n24: \\t\\"k8s.io/apiserver/pkg/server/healthz\\"\\n25: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm/containermap\\"\\n26: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm/resourceupdates\\"\\n27: \\t\\"k8s.io/kubernetes/pkg/kubelet/cm/topologymanager\\"\\n28: \\t\\"k8s.io/kubernetes/pkg/kubelet/config\\"\\n29: \\tkubecontainer \\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n30: \\t\\"k8s.io/kubernetes/pkg/kubelet/lifecycle\\"\\n31: \\t\\"k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache\\"\\n32: \\tschedulerframework \\"k8s.io/kubernetes/pkg/scheduler/framework\\"\\n33: )\\n34: \\n35: // Manager manages all the Device Plugins running on a node.\\n36: type Manager interface {\\n37: \\t// Start starts device plugin registration service.\\n38: \\tStart(activePods ActivePodsFunc, sourcesReady config.SourcesReady, initialContainers containermap.ContainerMap, initialContainerRunningSet sets.Set[string]) error\\n39: \\n40: \\t// Allocate configures and assigns devices to a container in a pod. From\\n41: \\t// the requested device resources, Allocate will communicate with the\\n42: \\t// owning device plugin to allow setup procedures to take place, and for\\n43: \\t// the device plugin to provide runtime settings to use the device\\n44: \\t// (environment variables, mount points and device files).\\n45: \\tAllocate(pod *v1.Pod, container *v1.Container) error\\n46: \\n47: \\t// UpdatePluginResources updates node resources based on devices already\\n48: \\t// allocated to pods. The node object is provided for the device manager to\\n49: \\t// update the node capacity to reflect the currently available devices.\\n50: \\tUpdatePluginResources(node *schedulerframework.NodeInfo, attrs *lifecycle.PodAdmitAttributes) error\\n51: \\n52: \\t// Stop stops the manager.\\n53: \\tStop() error\\n54: \\n55: \\t// GetDeviceRunContainerOptions checks whether we have cached containerDevices\\n56: \\t// for the passed-in <pod, container> and returns its DeviceRunContainerOptions\\n57: \\t// for the found one. An empty struct is returned in case no cached state is found.\\n58: \\tGetDeviceRunContainerOptions(pod *v1.Pod, container *v1.Container) (*DeviceRunContainerOptions, error)\\n59: \\n60: \\t// GetCapacity returns the amount of available device plugin resource capacity, resource allocatable\\n61: \\t// and inactive device plugin resources previously registered on the node.\\n62: \\tGetCapacity() (v1.ResourceList, v1.ResourceList, []string)\\n63: \\n64: \\t// GetWatcherHandler returns the plugin handler for the device manager.\\n65: \\tGetWatcherHandler() cache.PluginHandler\\n66: \\tGetHealthChecker() healthz.HealthChecker\\n67: \\n68: \\t// GetDevices returns information about the devices assigned to pods and containers\\n69: \\tGetDevices(podUID, containerName string) ResourceDeviceInstances\\n70: \\n71: \\t// UpdateAllocatedResourcesStatus updates the status of allocated resources for the pod.\\n72: \\tUpdateAllocatedResourcesStatus(pod *v1.Pod, status *v1.PodStatus)\\n...31. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "staging/src/k8s.io/cri-client/pkg/remote_image.go",
"startLine": 1,
"endLine": 60
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/staging/src/k8s.io/cri-client/pkg/remote_image.go%3FL1-60\\n1: /*\\n2: Copyright 2016 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package cri\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"errors\\"\\n22: \\t\\"fmt\\"\\n23: \\t\\"time\\"\\n24: \\n25: \\t\\"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc\\"\\n26: \\t\\"go.opentelemetry.io/otel/trace\\"\\n27: \\t\\"google.golang.org/grpc\\"\\n28: \\t\\"google.golang.org/grpc/backoff\\"\\n29: \\t\\"google.golang.org/grpc/codes\\"\\n30: \\t\\"google.golang.org/grpc/credentials/insecure\\"\\n31: \\t\\"google.golang.org/grpc/status\\"\\n32: \\n33: \\ttracing \\"k8s.io/component-base/tracing\\"\\n34: \\tinternalapi \\"k8s.io/cri-api/pkg/apis\\"\\n35: \\truntimeapi \\"k8s.io/cri-api/pkg/apis/runtime/v1\\"\\n36: \\t\\"k8s.io/klog/v2\\"\\n37: \\n38: \\t\\"k8s.io/cri-client/pkg/internal\\"\\n39: \\t\\"k8s.io/cri-client/pkg/util\\"\\n40: )\\n41: \\n42: // remoteImageService is a gRPC implementation of internalapi.ImageManagerService.\\n43: type remoteImageService struct {\\n44: \\ttimeout time.Duration\\n45: \\timageClient runtimeapi.ImageServiceClient\\n46: \\tlogger *klog.Logger\\n47: }\\n48: \\n49: // NewRemoteImageService creates a new internalapi.ImageManagerService.\\n50: func NewRemoteImageService(endpoint string, connectionTimeout time.Duration, tp trace.TracerProvider, logger *klog.Logger) (internalapi.ImageManagerService, error) {\\n51: \\tinternal.Log(logger, 3, \\"Connecting to image service\\", \\"endpoint\\", endpoint)\\n52: \\taddr, dialer, err := util.GetAddressAndDialer(endpoint)\\n53: \\tif err != nil {\\n54: \\t\\treturn nil, err\\n55: \\t}\\n56: \\n57: \\tctx, cancel := context.WithTimeout(context.Background(), connectionTimeout)\\n58: \\tdefer cancel()\\n59: \\n60: \\tvar dialOpts []grpc.DialOption\\n61: "}', 'structuredContent': {'text': 'URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/staging/src/k8s.io/cri-client/pkg/remote_image.go%3FL1-60\n1: /*\n2: Copyright 2016 The Kubernetes Authors.\n3: \n4: Licensed under the Apache License, Version 2.0 (the "License");\n5: you may not use this file except in compliance with the License.\n6: You may obtain a copy of the License at\n7: \n8: http://www.apache.org/licenses/LICENSE-2.0\n9: \n10: Unless required by applicable law or agreed to in writing, software\n11: distributed under the License is distributed on an "AS IS" BASIS,\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n13: See the License for the specific language governing permissions and\n14: limitations under the License.\n15: */\n16: \n17: package cri\n18: \n19: import (\n20: \t"context"\n21: \t"errors"\n22: \t"fmt"\n23: \t"time"\n24: \n25: \t"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"\n26: \t"go.opentelemetry.io/otel/trace"\n27: \t"google.golang.org/grpc"\n28: \t"google.golang.org/grpc/backoff"\n29: \t"google.golang.org/grpc/codes"\n30: \t"google.golang.org/grpc/credentials/insecure"\n31: \t"google.golang.org/grpc/status"\n32: \n33: \ttracing "k8s.io/component-base/tracing"\n34: \tinternalapi "k8s.io/cri-api/pkg/apis"\n35: \truntimeapi "k8s.io/cri...32. mcp__sourcegraph__sg_read_file
Input
{
"repo": "github.com/sg-evals/kubernetes--v1.32.0",
"path": "pkg/kubelet/pleg/evented.go",
"startLine": 1,
"endLine": 60
}Output
{'content': '{"text":"URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/pleg/evented.go%3FL1-60\\n1: /*\\n2: Copyright 2022 The Kubernetes Authors.\\n3: \\n4: Licensed under the Apache License, Version 2.0 (the \\"License\\");\\n5: you may not use this file except in compliance with the License.\\n6: You may obtain a copy of the License at\\n7: \\n8: http://www.apache.org/licenses/LICENSE-2.0\\n9: \\n10: Unless required by applicable law or agreed to in writing, software\\n11: distributed under the License is distributed on an \\"AS IS\\" BASIS,\\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n13: See the License for the specific language governing permissions and\\n14: limitations under the License.\\n15: */\\n16: \\n17: package pleg\\n18: \\n19: import (\\n20: \\t\\"context\\"\\n21: \\t\\"fmt\\"\\n22: \\t\\"sync\\"\\n23: \\t\\"time\\"\\n24: \\n25: \\t\\"k8s.io/apimachinery/pkg/types\\"\\n26: \\t\\"k8s.io/apimachinery/pkg/util/wait\\"\\n27: \\tinternalapi \\"k8s.io/cri-api/pkg/apis\\"\\n28: \\truntimeapi \\"k8s.io/cri-api/pkg/apis/runtime/v1\\"\\n29: \\t\\"k8s.io/klog/v2\\"\\n30: \\tkubecontainer \\"k8s.io/kubernetes/pkg/kubelet/container\\"\\n31: \\t\\"k8s.io/kubernetes/pkg/kubelet/metrics\\"\\n32: \\t\\"k8s.io/utils/clock\\"\\n33: )\\n34: \\n35: // The frequency with which global timestamp of the cache is to\\n36: // is to be updated periodically. If pod workers get stuck at cache.GetNewerThan\\n37: // call, after this period it will be unblocked.\\n38: const globalCacheUpdatePeriod = 5 * time.Second\\n39: \\n40: var (\\n41: \\teventedPLEGUsage = false\\n42: \\teventedPLEGUsageMu = sync.RWMutex{}\\n43: )\\n44: \\n45: // isEventedPLEGInUse indicates whether Evented PLEG is in use. Even after enabling\\n46: // the Evented PLEG feature gate, there could be several reasons it may not be in use.\\n47: // e.g. Streaming data issues from the runtime or the runtime does not implement the\\n48: // container events stream.\\n49: func isEventedPLEGInUse() bool {\\n50: \\teventedPLEGUsageMu.RLock()\\n51: \\tdefer eventedPLEGUsageMu.RUnlock()\\n52: \\treturn eventedPLEGUsage\\n53: }\\n54: \\n55: // setEventedPLEGUsage should only be accessed from\\n56: // Start/Stop of Evented PLEG.\\n57: func setEventedPLEGUsage(enable bool) {\\n58: \\teventedPLEGUsageMu.Lock()\\n59: \\tdefer eventedPLEGUsageMu.Unlock()\\n60: \\teventedPLEGUsage = enable\\n61: "}', 'structuredContent': {'text': 'URL: https://demo.sourcegraph.com/github.com/sg-evals/kubernetes--v1.32.0@d17b464c6fcd3273e4b1f695890bf0af7d5b272d/-/blob/pkg/kubelet/pleg/evented.go%3FL1-60\n1: /*\n2: Copyright 2022 The Kubernetes Authors.\n3: \n4: Licensed under the Apache License, Version 2.0 (the "License");\n5: you may not use this file except in compliance with the License.\n6: You may obtain a copy of the License at\n7: \n8: http://www.apache.org/licenses/LICENSE-2.0\n9: \n10: Unless required by applicable law or agreed to in writing, software\n11: distributed under the License is distributed on an "AS IS" BASIS,\n12: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n13: See the License for the specific language governing permissions and\n14: limitations under the License.\n15: */\n16: \n17: package pleg\n18: \n19: import (\n20: \t"context"\n21: \t"fmt"\n22: \t"sync"\n23: \t"time"\n24: \n25: \t"k8s.io/apimachinery/pkg/types"\n26: \t"k8s.io/apimachinery/pkg/util/wait"\n27: \tinternalapi "k8s.io/cri-api/pkg/apis"\n28: \truntimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"\n29: \t"k8s.io/klog/v2"\n30: \tkubecontainer "k8s.io/kubernetes/pkg/kubelet/container"\n31: \t"k8s.io/kubernetes/pkg/kubelet/metrics"\n32: \t"k8s.io/utils/clock"\n33: )\n34: \n35: // The frequency with which global timestamp of the cache is to\n36: // is to be updated periodically. If pod workers get stuck at cache.GetNewerThan\n37: // call, after this period it will be unblocke...33. Write
Input
{
"file_path": "/workspace/answer.json",
"content": "{\n \"files\": [\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/interfaces.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/handlers.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/predicate.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pod_workers.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pleg/pleg.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pleg/generic.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pleg/evented.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"staging/src/k8s.io/cri-client/pkg/remote_runtime.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"staging/src/k8s.io/cri-client/pkg/remote_image.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/kuberuntime/kuberuntime_manager.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/volumemanager/volume_manager.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/volumemanager/reconciler/reconciler.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/cm/devicemanager/manager.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/cm/devicemanager/types.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/cm/devicemanager/endpoint.go\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/cm/devicemanager/pod_devices.go\"}\n ],\n \"symbols\": [\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/interfaces.go\", \"symbol\": \"PodLifecycleTarget\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/interfaces.go\", \"symbol\": \"PodAdmitHandler\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/interfaces.go\", \"symbol\": \"PodSyncLoopHandler\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/interfaces.go\", \"symbol\": \"PodSyncHandler\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/lifecycle/handlers.go\", \"symbol\": \"handlerRunner\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pod_workers.go\", \"symbol\": \"podWorkers\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pod_workers.go\", \"symbol\": \"PodWorkers\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pod_workers.go\", \"symbol\": \"newPodWorkers\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pleg/pleg.go\", \"symbol\": \"PodLifecycleEventGenerator\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pleg/pleg.go\", \"symbol\": \"PodLifecycleEvent\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"pkg/kubelet/pleg/generic.go\", \"symbol\": \"GenericPLEG\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"staging/src/k8s.io/cri-client/pkg/remote_runtime.go\", \"symbol\": \"remoteRuntimeService\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"staging/src/k8s.io/cri-client/pkg/remote_runtime.go\", \"symbol\": \"NewRemoteRuntimeService\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"staging/src/k8s.io/cri-client/pkg/remote_image.go\", \"symbol\": \"remoteImageService\"},\n {\"repo\": \"sg-evals/kubernetes--v1.32.0\", \"path\": \"staging/src/k8s.io/cri-client/pkg/remote_image.go\", \"symbol\": \"NewRemoteImageService\"},\n {\"repo\": \"sg-evals/kubernetes--v
...Output
{'type': 'create', 'filePath': '/workspace/answer.json', 'content': '{\n "files": [\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/interfaces.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/handlers.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/predicate.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pod_workers.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pleg/pleg.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pleg/generic.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pleg/evented.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "staging/src/k8s.io/cri-client/pkg/remote_runtime.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "staging/src/k8s.io/cri-client/pkg/remote_image.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/kuberuntime/kuberuntime_manager.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/volumemanager/volume_manager.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/volumemanager/reconciler/reconciler.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/cm/devicemanager/manager.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/cm/devicemanager/types.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/cm/devicemanager/endpoint.go"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/cm/devicemanager/pod_devices.go"}\n ],\n "symbols": [\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/interfaces.go", "symbol": "PodLifecycleTarget"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/interfaces.go", "symbol": "PodAdmitHandler"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/interfaces.go", "symbol": "PodSyncLoopHandler"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/interfaces.go", "symbol": "PodSyncHandler"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/lifecycle/handlers.go", "symbol": "handlerRunner"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pod_workers.go", "symbol": "podWorkers"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pod_workers.go", "symbol": "PodWorkers"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pod_workers.go", "symbol": "newPodWorkers"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pleg/pleg.go", "symbol": "PodLifecycleEventGenerator"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pleg/pleg.go", "symbol": "PodLifecycleEvent"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/pleg/generic.go", "symbol": "GenericPLEG"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "staging/src/k8s.io/cri-client/pkg/remote_runtime.go", "symbol": "remoteRuntimeService"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "staging/src/k8s.io/cri-client/pkg/remote_runtime.go", "symbol": "NewRemoteRuntimeService"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "staging/src/k8s.io/cri-client/pkg/remote_image.go", "symbol": "remoteImageService"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "staging/src/k8s.io/cri-client/pkg/remote_image.go", "symbol": "NewRemoteImageService"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/kuberuntime/kuberuntime_manager.go", "symbol": "kubeGenericRuntimeManager"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pkg/kubelet/kuberuntime/kuberuntime_manager.go", "symbol": "NewKubeGenericRuntimeManager"},\n {"repo": "sg-evals/kubernetes--v1.32.0", "path": "pk...