Merge pull request #21397 from rhatdan/codespell

Run codespell on code
This commit is contained in:
openshift-merge-bot[bot]
2024-01-29 09:17:33 +00:00
committed by GitHub
19 changed files with 19 additions and 19 deletions

View File

@ -304,7 +304,7 @@ test/version/version: version/version.go
.PHONY: codespell .PHONY: codespell
codespell: codespell:
codespell -S bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w codespell -S bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w
.PHONY: validate .PHONY: validate
validate: lint .gitvalidation validate.completions man-page-check swagger-check tests-included tests-expect-exit pr-removes-fixed-skips validate: lint .gitvalidation validate.completions man-page-check swagger-check tests-included tests-expect-exit pr-removes-fixed-skips

View File

@ -19,7 +19,7 @@ outdated) example of it's output can be seen below:
While it's arguably easier to read that `only_if`, it leads to a cluttered While it's arguably easier to read that `only_if`, it leads to a cluttered
status output that's harder to page through when reviewing PRs. As opposed status output that's harder to page through when reviewing PRs. As opposed
to `only_if` which will bypass creation of the task (at runtime) completely. to `only_if` which will bypass creation of the task (at runtime) completely.
Also, by sticking to one conditional style, it's easier to re-use the YAML Also, by sticking to one conditional style, it's easier to reuse the YAML
statements across multiple tasks. statements across multiple tasks.
+ The only variables which can be used as part of conditions are defined by + The only variables which can be used as part of conditions are defined by

View File

@ -4,7 +4,7 @@ set -euo pipefail
# This script is intended to be called by Cirrus-CI on a Mac M1 persistent worker. # This script is intended to be called by Cirrus-CI on a Mac M1 persistent worker.
# It runs /after/ `mac_setup.sh` to help developers debug any environment # It runs /after/ `mac_setup.sh` to help developers debug any environment
# related issues. It must not make any actualy changes to the environment. # related issues. It must not make any actually changes to the environment.
# Many variables can affect operations, make them all known to assist debugging. # Many variables can affect operations, make them all known to assist debugging.
echo "Selection of current env. vars:" echo "Selection of current env. vars:"

View File

@ -160,7 +160,7 @@ type ContainerRootFSConfig struct {
// pre-1.8, which was used in very old Podman versions to determine how // pre-1.8, which was used in very old Podman versions to determine how
// image volumes were handled in Libpod (support for these eventually // image volumes were handled in Libpod (support for these eventually
// moved out of Libpod into pkg/specgen). // moved out of Libpod into pkg/specgen).
// Please DO NOT re-use the `imageVolumes` name in container JSON again. // Please DO NOT reuse the `imageVolumes` name in container JSON again.
ImageVolumes []*ContainerImageVolume `json:"ctrImageVolumes,omitempty"` ImageVolumes []*ContainerImageVolume `json:"ctrImageVolumes,omitempty"`
// CreateWorkingDir indicates that Libpod should create the container's // CreateWorkingDir indicates that Libpod should create the container's
// working directory if it does not exist. Some OCI runtimes do this by // working directory if it does not exist. Some OCI runtimes do this by

View File

@ -40,7 +40,7 @@ const (
sqliteOptionForeignKeys = "&_foreign_keys=1" sqliteOptionForeignKeys = "&_foreign_keys=1"
// Make sure that transactions happen exclusively. // Make sure that transactions happen exclusively.
sqliteOptionTXLock = "&_txlock=exclusive" sqliteOptionTXLock = "&_txlock=exclusive"
// Make sure busy timeout is set to high value to keep retying when the db is locked. // Make sure busy timeout is set to high value to keep retrying when the db is locked.
// Timeout is in ms, so set it to 100s to have enough time to retry the operations. // Timeout is in ms, so set it to 100s to have enough time to retry the operations.
sqliteOptionBusyTimeout = "&_busy_timeout=100000" sqliteOptionBusyTimeout = "&_busy_timeout=100000"

View File

@ -71,7 +71,7 @@ type APIVersionError struct {
// NewAPIVersionError create bindings error when the endpoint on the server is not supported // NewAPIVersionError create bindings error when the endpoint on the server is not supported
// because the version is to old. // because the version is to old.
// - endpoint is the name fo the endpoint (e.g. /containers/json) // - endpoint is the name for the endpoint (e.g. /containers/json)
// - version is the server API version // - version is the server API version
// - requiredVersion is the server version need to use said endpoint // - requiredVersion is the server version need to use said endpoint
func NewAPIVersionError(endpoint string, version *semver.Version, requiredVersion string) *APIVersionError { func NewAPIVersionError(endpoint string, version *semver.Version, requiredVersion string) *APIVersionError {

View File

@ -481,7 +481,7 @@ type ContainerRenameOptions struct {
NewName string NewName string
} }
// ContainerCloneOptions contains options for cloning an existing continer // ContainerCloneOptions contains options for cloning an existing container
type ContainerCloneOptions struct { type ContainerCloneOptions struct {
ID string ID string
Destroy bool Destroy bool

View File

@ -48,7 +48,7 @@ type ManifestAddOptions struct {
type ManifestAnnotateOptions struct { type ManifestAnnotateOptions struct {
// Annotation to add to manifest list // Annotation to add to manifest list
Annotation []string `json:"annotation" schema:"annotation"` Annotation []string `json:"annotation" schema:"annotation"`
// Annotations to add to manifest list by a map which is prefferred over Annotation // Annotations to add to manifest list by a map which is preferred over Annotation
Annotations map[string]string `json:"annotations" schema:"annotations"` Annotations map[string]string `json:"annotations" schema:"annotations"`
// Arch overrides the architecture for the image // Arch overrides the architecture for the image
Arch string `json:"arch" schema:"arch"` Arch string `json:"arch" schema:"arch"`

View File

@ -464,7 +464,7 @@ func ValidatePodStatsOptions(args []string, options *PodStatsOptions) error {
// PodLogsOptionsToContainerLogsOptions converts PodLogOptions to ContainerLogOptions // PodLogsOptionsToContainerLogsOptions converts PodLogOptions to ContainerLogOptions
func PodLogsOptionsToContainerLogsOptions(options PodLogsOptions) ContainerLogsOptions { func PodLogsOptionsToContainerLogsOptions(options PodLogsOptions) ContainerLogsOptions {
// PodLogsOptions are similar but contains few extra fields like ctrName // PodLogsOptions are similar but contains few extra fields like ctrName
// So cast other values as is so we can re-use the code // So cast other values as is so we can reuse the code
containerLogsOpts := ContainerLogsOptions{ containerLogsOpts := ContainerLogsOptions{
Details: options.Details, Details: options.Details,
Latest: options.Latest, Latest: options.Latest,

View File

@ -630,7 +630,7 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
// error out instead reuse the current volume. // error out instead reuse the current volume.
vol, err = ic.Libpod.GetVolume(v.Source) vol, err = ic.Libpod.GetVolume(v.Source)
if err != nil { if err != nil {
return nil, nil, fmt.Errorf("cannot re-use local volume for volume from configmap %q: %w", v.Source, err) return nil, nil, fmt.Errorf("cannot reuse local volume for volume from configmap %q: %w", v.Source, err)
} }
} else { } else {
return nil, nil, fmt.Errorf("cannot create a local volume for volume from configmap %q: %w", v.Source, err) return nil, nil, fmt.Errorf("cannot create a local volume for volume from configmap %q: %w", v.Source, err)

View File

@ -121,7 +121,7 @@ func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrID string, options
} }
// PodLogsOptions are similar but contains few extra fields like ctrName // PodLogsOptions are similar but contains few extra fields like ctrName
// So cast other values as is so we can re-use the code // So cast other values as is so we can reuse the code
containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options) containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options)
return ic.ContainerLogs(ctx, ctrNames, containerLogsOpts) return ic.ContainerLogs(ctx, ctrNames, containerLogsOpts)

View File

@ -46,7 +46,7 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt
func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrIDs string, options entities.PodLogsOptions) error { func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrIDs string, options entities.PodLogsOptions) error {
// PodLogsOptions are similar but contains few extra fields like ctrName // PodLogsOptions are similar but contains few extra fields like ctrName
// So cast other values as is so we can re-use the code // So cast other values as is so we can reuse the code
containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options) containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options)
// interface only accepts slice, keep everything consistent // interface only accepts slice, keep everything consistent

View File

@ -5013,7 +5013,7 @@ type RollingUpdateDaemonSet struct {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod // pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any // on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated // reason (Ready transitions to false, is evicted, or is drained) an updated
// pod is immediatedly created on that node without considering surge limits. // pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the // Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and // daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may // so resource intensive daemonsets should take into account that they may

View File

@ -87,7 +87,7 @@ import (
// //
// This format is intended to make it difficult to use these numbers without // This format is intended to make it difficult to use these numbers without
// writing some sort of special handling code in the hopes that that will // writing some sort of special handling code in the hopes that that will
// cause implementors to also use a fixed point implementation. // cause implementers to also use a fixed point implementation.
// //
// +protobuf=true // +protobuf=true
// +protobuf.embed=string // +protobuf.embed=string

View File

@ -781,7 +781,7 @@ func GetPodmanDockerTmpConfig(uid int, rootful bool, newline bool) string {
} }
// SetIgnitionFile creates a new Machine File for the machine's ignition file // SetIgnitionFile creates a new Machine File for the machine's ignition file
// and assignes the handle to `loc` // and assigns the handle to `loc`
func SetIgnitionFile(loc *define.VMFile, vmtype define.VMType, vmName, vmConfigDir string) error { func SetIgnitionFile(loc *define.VMFile, vmtype define.VMType, vmName, vmConfigDir string) error {
ignitionFile, err := define.NewMachineFile(filepath.Join(vmConfigDir, vmName+".ign"), nil) ignitionFile, err := define.NewMachineFile(filepath.Join(vmConfigDir, vmName+".ign"), nil)
if err != nil { if err != nil {

View File

@ -146,7 +146,7 @@ EOF
echo "-----------------" echo "-----------------"
cat -vET $envfile2 cat -vET $envfile2
# See above for resoning behind 'env -0' and a results file # See above for reasoning behind 'env -0' and a results file
local resultsfile="$PODMAN_TMPDIR/envresults" local resultsfile="$PODMAN_TMPDIR/envresults"
touch $resultsfile touch $resultsfile
run_podman run --rm -v "$resultsfile:/envresults:Z" \ run_podman run --rm -v "$resultsfile:/envresults:Z" \

View File

@ -880,7 +880,7 @@ EOF
fi fi
local net1=a-$(random_string 10) local net1=a-$(random_string 10)
# use /29 subnet to limt available ip space, a 29 gives 5 usable addresses (6 - 1 for the gw) # use /29 subnet to limit available ip space, a 29 gives 5 usable addresses (6 - 1 for the gw)
local subnet="$(random_rfc1918_subnet).0/29" local subnet="$(random_rfc1918_subnet).0/29"
run_podman network create --subnet $subnet $net1 run_podman network create --subnet $subnet $net1
local cname=con-$(random_string 10) local cname=con-$(random_string 10)

View File

@ -244,7 +244,7 @@ EOF
run_podman container exec $cname grep CapBnd /proc/self/status run_podman container exec $cname grep CapBnd /proc/self/status
non_privileged_caps="$output" non_privileged_caps="$output"
run_podman --module=$conf_tmp container exec $cname grep CapBnd /proc/self/status run_podman --module=$conf_tmp container exec $cname grep CapBnd /proc/self/status
assert "$output" != "$non_privileged_caps" "--module should enable a prvileged exec session" assert "$output" != "$non_privileged_caps" "--module should enable a privileged exec session"
run_podman rm -f -t0 $cname run_podman rm -f -t0 $cname
} }

View File

@ -56,7 +56,7 @@ func UntarToFileSystem(dest string, tarball *os.File, options *archive.TarOption
return archive.Untar(tarball, dest, options) return archive.Untar(tarball, dest, options)
} }
// Creates a new tar file and wrties bytes from io.ReadCloser // Creates a new tar file and writes bytes from io.ReadCloser
func CreateTarFromSrc(source string, dest string) error { func CreateTarFromSrc(source string, dest string) error {
file, err := os.Create(dest) file, err := os.Create(dest)
if err != nil { if err != nil {