_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c176000
test
// New constructs a Spyglass object from a JobAgent, a config.Agent, and a storage Client.
{ "resource": "" }
c176001
test
// Lenses gets all views of all artifact files matching each regexp with a registered lens
{ "resource": "" }
c176002
test
// JobPath returns a link to the GCS directory for the job specified in src
{ "resource": "" }
c176003
test
// RunPath returns the path to the GCS directory for the job run specified in src.
{ "resource": "" }
c176004
test
// ExtraLinks fetches started.json and extracts links from metadata.links.
{ "resource": "" }
c176005
test
// needDemux returns whether there are any external plugins that need to // get the present event.
{ "resource": "" }
c176006
test
// demuxExternal dispatches the provided payload to the external plugins.
{ "resource": "" }
c176007
test
// dispatch creates a new request using the provided payload and headers // and dispatches the request to the provided endpoint.
{ "resource": "" }
c176008
test
// AddFlags adds "state" and "percentiles" to the command help
{ "resource": "" }
c176009
test
// CheckFlags configures which states to monitor
{ "resource": "" }
c176010
test
// ReceiveIssueEvent computes age percentiles and saves them to InfluxDB
{ "resource": "" }
c176011
test
// Load loads and parses the config at path.
{ "resource": "" }
c176012
test
// loadConfig loads one or multiple config files and returns a config object.
{ "resource": "" }
c176013
test
// yamlToConfig converts a yaml file into a Config object
{ "resource": "" }
c176014
test
// ReadFileMaybeGZIP wraps ioutil.ReadFile, returning the decompressed contents // if the file is gzipped, or otherwise the raw contents
{ "resource": "" }
c176015
test
// finalizeJobConfig mutates and fixes entries for jobspecs
{ "resource": "" }
c176016
test
// validateComponentConfig validates the infrastructure component configuration
{ "resource": "" }
c176017
test
// ConfigPath returns the value for the component's configPath if provided // explicitly or default otherwise.
{ "resource": "" }
c176018
test
// ValidateController validates the provided controller config.
{ "resource": "" }
c176019
test
// defaultJobBase configures common parameters, currently Agent and Namespace.
{ "resource": "" }
c176020
test
// SetPresubmitRegexes compiles and validates all the regular expressions for // the provided presubmits.
{ "resource": "" }
c176021
test
// setBrancherRegexes compiles and validates all the regular expressions for // the provided branch specifiers.
{ "resource": "" }
c176022
test
// SetPostsubmitRegexes compiles and validates all the regular expressions for // the provided postsubmits.
{ "resource": "" }
c176023
test
// Body creates a view for prow job metadata.
{ "resource": "" }
c176024
test
//NewBoskosHandler constructs the boskos handler.
{ "resource": "" }
c176025
test
// ErrorToStatus translates error into http code
{ "resource": "" }
c176026
test
// DumpProfile dumps the profile to the given file destination. // If the destination is "-", it instead writes to stdout.
{ "resource": "" }
c176027
test
// LoadProfile loads a profile from the given filename. // If the filename is "-", it instead reads from stdin.
{ "resource": "" }
c176028
test
// NewClient returns a client that talks to GitHub. It will fail if git is not // in the PATH.
{ "resource": "" }
c176029
test
// SetCredentials sets credentials in the client to be used for pushing to // or pulling from remote repositories.
{ "resource": "" }
c176030
test
// Checkout runs git checkout.
{ "resource": "" }
c176031
test
// CheckoutNewBranch creates a new branch and checks it out.
{ "resource": "" }
c176032
test
// Merge attempts to merge commitlike into the current branch. It returns true // if the merge completes. It returns an error if the abort fails.
{ "resource": "" }
c176033
test
// CheckoutPullRequest does exactly that.
{ "resource": "" }
c176034
test
// Config runs git config.
{ "resource": "" }
c176035
test
// retryCmd will retry the command a few times with backoff. Use this for any // commands that will be talking to GitHub, such as clones or fetches.
{ "resource": "" }
c176036
test
// LabelsAndAnnotationsForSpec returns a minimal set of labels to add to prowjobs or its owned resources. // // User-provided extraLabels and extraAnnotations values will take precedence over auto-provided values.
{ "resource": "" }
c176037
test
// ProwJobToPod converts a ProwJob to a Pod that will run the tests.
{ "resource": "" }
c176038
test
// CloneLogPath returns the path to the clone log file in the volume mount. // CloneLogPath returns the path to the clone log file in the volume mount.
{ "resource": "" }
c176039
test
// cloneEnv encodes clonerefs Options into json and puts it into an environment variable
{ "resource": "" }
c176040
test
// sshVolume converts a secret holding ssh keys into the corresponding volume and mount. // // This is used by CloneRefs to attach the mount to the clonerefs container.
{ "resource": "" }
c176041
test
// InjectEntrypoint will make the entrypoint binary in the tools volume the container's entrypoint, which will output to the log volume.
{ "resource": "" }
c176042
test
// PlaceEntrypoint will copy entrypoint from the entrypoint image to the tools volume
{ "resource": "" }
c176043
test
// kubeEnv transforms a mapping of environment variables // into their serialized form for a PodSpec, sorting by // the name of the env vars
{ "resource": "" }
c176044
test
// Client returns a Kubernetes client.
{ "resource": "" }
c176045
test
// handle interacts with GitHub to drive the pull request to the // proper state by adding and removing comments and labels. If a // PR has a WIP prefix, it needs an explanatory comment and label. // Otherwise, neither should be present.
{ "resource": "" }
c176046
test
// SendHook sends a GitHub event of type eventType to the provided address.
{ "resource": "" }
c176047
test
// Clean by janitor script
{ "resource": "" }
c176048
test
// async janitor goroutine
{ "resource": "" }
c176049
test
// Run will block listening to all subscriptions and return once the context is cancelled // or one of the subscription has a unrecoverable error.
{ "resource": "" }
c176050
test
// specToStarted translate a jobspec into a started struct // optionally overwrite RepoVersion with provided mainRefSHA
{ "resource": "" }
c176051
test
// Run will start the initupload job to upload the artifacts, logs and clone status.
{ "resource": "" }
c176052
test
// hasPRChanged indicates that the code diff may have changed.
{ "resource": "" }
c176053
test
// UpdateIssues downloads new issues and saves in database
{ "resource": "" }
c176054
test
// handleReviewEvent should only handle reviews that have no approval command. // Reviews with approval commands will be handled by handleGenericCommentEvent.
{ "resource": "" }
c176055
test
// Returns associated issue, or 0 if it can't find any. // This is really simple, and could be improved later.
{ "resource": "" }
c176056
test
// optionsForRepo gets the plugins.Approve struct that is applicable to the indicated repo.
{ "resource": "" }
c176057
test
// localOnlyMain contains logic used only when running locally, and is mutually exclusive with // prodOnlyMain.
{ "resource": "" }
c176058
test
// summarize summarizes all items in the Group and stores the result
{ "resource": "" }
c176059
test
// Subset returns the subset obtained through applying filter
{ "resource": "" }
c176060
test
// ListDirectories gets a list a sub-directories that contains source code.
{ "resource": "" }
c176061
test
// readRequest extracts the request from the AdmissionReview reader
{ "resource": "" }
c176062
test
// handle reads the request and writes the response
{ "resource": "" }
c176063
test
// writeResponse gets the response from onlyUpdateStatus and writes it to w.
{ "resource": "" }
c176064
test
// onlyUpdateStatus returns the response to the request
{ "resource": "" }
c176065
test
// convertSuiteMeta converts a junit result in gcs to a ResultStore Suite.
{ "resource": "" }
c176066
test
// NewHealth creates a new health request multiplexer and starts serving the liveness endpoint // on the given port
{ "resource": "" }
c176067
test
// ServeReady starts serving the readiness endpoint
{ "resource": "" }
c176068
test
// NewController makes a Controller out of the given clients.
{ "resource": "" }
c176069
test
// newExpectedContext creates a Context with Expected state.
{ "resource": "" }
c176070
test
// contextsToStrings converts a list Context to a list of string
{ "resource": "" }
c176071
test
// filterSubpools filters non-pool PRs out of the initially identified subpools, // deleting any pools that become empty. // See filterSubpool for filtering details.
{ "resource": "" }
c176072
test
// filterSubpool filters PRs from an initially identified subpool, returning the // filtered subpool. // If the subpool becomes empty 'nil' is returned to indicate that the subpool // should be deleted.
{ "resource": "" }
c176073
test
// poolPRMap collects all subpool PRs into a map containing all pooled PRs.
{ "resource": "" }
c176074
test
// unsuccessfulContexts determines which contexts from the list that we care about are // failed. For instance, we do not care about our own context. // If the branchProtection is set to only check for required checks, we will skip // all non-required tests. If required tests are missing from the list, they will be // ...
{ "resource": "" }
c176075
test
// accumulate returns the supplied PRs sorted into three buckets based on their // accumulated state across the presubmits.
{ "resource": "" }
c176076
test
// tryMerge attempts 1 merge and returns a bool indicating if we should try // to merge the remaining PRs and possibly an error.
{ "resource": "" }
c176077
test
// prChanges gets the files changed by the PR, either from the cache or by // querying GitHub.
{ "resource": "" }
c176078
test
// prune removes any cached file changes that were not used since the last prune.
{ "resource": "" }
c176079
test
// dividePool splits up the list of pull requests and prow jobs into a group // per repo and branch. It only keeps ProwJobs that match the latest branch.
{ "resource": "" }
c176080
test
// AggregateProfiles takes multiple coverage profiles and produces a new // coverage profile that counts the number of profiles that hit a block at least // once.
{ "resource": "" }
c176081
test
// countToBoolean converts a profile containing hit counts to instead contain // only 1s or 0s.
{ "resource": "" }
c176082
test
// NewStorage instantiates a new Storage with a PersistenceLayer implementation // If storage string is not empty, it will read resource data from the file
{ "resource": "" }
c176083
test
// AddResource adds a new resource
{ "resource": "" }
c176084
test
// DeleteResource deletes a resource if it exists, errors otherwise
{ "resource": "" }
c176085
test
// UpdateResource updates a resource if it exists, errors otherwise
{ "resource": "" }
c176086
test
// GetResource gets an existing resource, errors otherwise
{ "resource": "" }
c176087
test
// GetResources list all resources
{ "resource": "" }
c176088
test
// SyncResources will update resources every 10 mins. // It will append newly added resources to ranch.Resources, // And try to remove newly deleted resources from ranch.Resources. // If the newly deleted resource is currently held by a user, the deletion will // yield to next update cycle.
{ "resource": "" }
c176089
test
// ParseConfig reads in configPath and returns a list of resource objects // on success.
{ "resource": "" }
c176090
test
// problemsInFiles runs buildifier on the files. It returns a map from the file to // a list of problems with that file.
{ "resource": "" }
c176091
test
// NewPodLogArtifact creates a new PodLogArtifact
{ "resource": "" }
c176092
test
// CanonicalLink returns a link to where pod logs are streamed
{ "resource": "" }
c176093
test
// ReadAt implements reading a range of bytes from the pod logs endpoint
{ "resource": "" }
c176094
test
// ReadAll reads all available pod logs, failing if they are too large
{ "resource": "" }
c176095
test
// ReadAtMost reads at most n bytes
{ "resource": "" }
c176096
test
// ReadTail reads the last n bytes of the pod log
{ "resource": "" }
c176097
test
// newProblems compares the list of problems with the list of past comments on // the PR to decide which are new.
{ "resource": "" }
c176098
test
// problemsInFiles runs golint on the files. It returns a map from the file to // a map from the line in the patch to the problem.
{ "resource": "" }
c176099
test
// remove merged presets from a podspec
{ "resource": "" }