Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo #1005

Merged
merged 5 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/dkron.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func initConfig() {
}

if err := viper.Unmarshal(config); err != nil {
logrus.WithError(err).Fatal("config: Error unmarshaling config")
logrus.WithError(err).Fatal("config: Error unmarshalling config")
}

cliTags := viper.GetStringSlice("tag")
Expand All @@ -73,7 +73,7 @@ func initConfig() {
if len(cliTags) > 0 {
tags, err = UnmarshalTags(cliTags)
if err != nil {
logrus.WithError(err).Fatal("config: Error unmarshaling cli tags")
logrus.WithError(err).Fatal("config: Error unmarshalling cli tags")
}
} else {
tags = viper.GetStringMapString("tags")
Expand Down
2 changes: 1 addition & 1 deletion dkron/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Execution struct {
// When the execution finished running.
FinishedAt time.Time `json:"finished_at,omitempty"`

// If this execution executed succesfully.
// If this execution executed successfully.
Success bool `json:"success"`

// Partial output of the execution.
Expand Down
2 changes: 1 addition & 1 deletion dkron/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
SetExecutionType
// DeleteExecutionsType is the command used to delete executions from the store.
DeleteExecutionsType
// ExecutionDoneType is the command to perform the logic needed once an exeuction
// ExecutionDoneType is the command to perform the logic needed once an execution
// is done.
ExecutionDoneType
)
Expand Down
2 changes: 1 addition & 1 deletion dkron/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func (grpcc *GRPCClient) AgentRun(addr string, job *proto.Job, execution *proto.

// Error received from the stream
if err != nil {
// At this point the execution status will be unknown, set the FinshedAt time and an explanatory message
// At this point the execution status will be unknown, set the FinishedAt time and an explanatory message
execution.FinishedAt = ptypes.TimestampNow()
execution.Output = []byte(err.Error())

Expand Down
8 changes: 4 additions & 4 deletions dkron/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const (
StatusRunning = "running"
// StatusFailed is status of a job whose last run was not successful on any nodes.
StatusFailed = "failed"
// StatusPartialyFailed is status of a job whose last run was successful on only some nodes.
StatusPartialyFailed = "partially_failed"
// StatusPartiallyFailed is status of a job whose last run was successful on only some nodes.
StatusPartiallyFailed = "partially_failed"

// ConcurrencyAllow allows a job to execute concurrency.
ConcurrencyAllow = "allow"
Expand All @@ -48,7 +48,7 @@ var (
ErrWrongConcurrency = errors.New("invalid concurrency policy value, use \"allow\" or \"forbid\"")
)

// Job descibes a scheduled Job.
// Job describes a scheduled Job.
type Job struct {
// Job id. Must be unique, it's a copy of name.
ID string `json:"id"`
Expand Down Expand Up @@ -78,7 +78,7 @@ type Job struct {
// Number of errors running this job.
ErrorCount int `json:"error_count"`

// Last time this job executed succesful.
// Last time this job executed successfully.
LastSuccess ntime.NullableTime `json:"last_success"`

// Last time this job failed.
Expand Down
4 changes: 2 additions & 2 deletions dkron/raft_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ type RaftLayer struct {
logger *logrus.Entry
}

// NewRaftLayer returns an initialized unecrypted RaftLayer.
// NewRaftLayer returns an initialized unencrypted RaftLayer.
func NewRaftLayer(logger *logrus.Entry) *RaftLayer {
return &RaftLayer{logger: logger}
}

// NewTLSRaftLayer returns an initialized TLS-ecrypted RaftLayer.
// NewTLSRaftLayer returns an initialized TLS-encrypted RaftLayer.
func NewTLSRaftLayer(tlsConfig *tls.Config, logger *logrus.Entry) *RaftLayer {
return &RaftLayer{
TLSConfig: tlsConfig,
Expand Down
4 changes: 2 additions & 2 deletions dkron/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (
cronInspect = expvar.NewMap("cron_entries")
schedulerStarted = expvar.NewInt("scheduler_started")

// ErrScheduleParse is the error returned when the schdule parsing fails.
// ErrScheduleParse is the error returned when the schedule parsing fails.
ErrScheduleParse = errors.New("can't parse job schedule")
)

Expand Down Expand Up @@ -104,7 +104,7 @@ func (s *Scheduler) ClearCron() {
s.Cron = nil
}

// Started will safely return if the schduler is started or not
// Started will safely return if the scheduler is started or not
func (s *Scheduler) Started() bool {
s.mu.RLock()
defer s.mu.RUnlock()
Expand Down
2 changes: 1 addition & 1 deletion dkron/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

// Storage is the interface that should be used by any
// storage engine implemented for dkron. It contains the
// minumum set of operations that are needed to have a working
// minimum set of operations that are needed to have a working
// dkron store.
type Storage interface {
SetJob(job *Job, copyDependentJobs bool) error
Expand Down
2 changes: 1 addition & 1 deletion dkron/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ func (s *Store) computeStatus(jobName string, exGroup int64, tx *buntdb.Tx) (str
} else if failed > 0 && success == 0 {
status = StatusFailed
} else if failed > 0 && success > 0 {
status = StatusPartialyFailed
status = StatusPartiallyFailed
}

return status, nil
Expand Down
2 changes: 1 addition & 1 deletion dkron/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func Test_computeStatus(t *testing.T) {
// Tests status
err = s.db.View(func(tx *buntdb.Tx) error {
status, _ := s.computeStatus("test", 1, tx)
assert.Equal(t, StatusPartialyFailed, status)
assert.Equal(t, StatusPartiallyFailed, status)

status, _ = s.computeStatus("test", 2, tx)
assert.Equal(t, StatusSuccess, status)
Expand Down
2 changes: 1 addition & 1 deletion plugin/execution_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ type ProcessorServer struct {
Processor Processor
}

// Process will call the actuall Process method of the plugin
// Process will call the actual Process method of the plugin
func (e *ProcessorServer) Process(args *ProcessorArgs, resp *types.Execution) error {
*resp = e.Processor.Process(args)
return nil
Expand Down