From 7ee8ddba6a21a1c8781c96ad112eeaffc7b502b5 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 14 May 2021 16:26:02 -0400 Subject: [PATCH] True up some spelling --- CHANGELOG.md | 4 ++-- internal/cmd/commands/server/server.go | 2 +- internal/db/schema/manager.go | 2 +- internal/oplog/any_operation.pb.go | 2 +- .../local/controller/storage/oplog/v1/any_operation.proto | 2 +- internal/scheduler/additional_verification_test.go | 2 +- internal/scheduler/scheduler.go | 4 ++-- internal/scheduler/testing.go | 2 +- internal/servers/controller/handlers/marshler.go | 2 +- .../servers/controller/handlers/workers/worker_service.go | 2 +- internal/servers/worker/status.go | 2 +- internal/tests/cli/boundary/sessions.bats | 4 ++-- website/content/docs/api-clients/desktop.mdx | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 519415433..a822f029c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Canonical reference for changes, improvements, and bugfixes for Boundary. ([Issue 1](https://github.com/hashicorp/boundary/issues/894), [Issue 2](https://github.com/hashicorp/boundary/issues/1055), [PR](https://github.com/hashicorp/boundary/pull/1220)) -* sessions: Add some missing API-level checks when session cancelation was +* sessions: Add some missing API-level checks when session cancellation was requested. It's much easier than interpreting the domain-level check failures. [PR](https://github.com/hashicorp/boundary/pull/1223)) @@ -326,7 +326,7 @@ for more details. ([Issue](https://github.com/hashicorp/boundary/pull/902), [PR](https://github.com/hashicorp/boundary/pull/901)) * server: When shutting down a controller release the shared advisory lock with - a non-cancelled context. + a non-canceled context. ([Issue](https://github.com/hashicorp/boundary/pull/909), [PR](https://github.com/hashicorp/boundary/pull/918)) * targets: If a worker filter references a key that doesn't exist, treat it as a diff --git a/internal/cmd/commands/server/server.go b/internal/cmd/commands/server/server.go index 501d9c6ab..c3c1a9d02 100644 --- a/internal/cmd/commands/server/server.go +++ b/internal/cmd/commands/server/server.go @@ -384,7 +384,7 @@ func (c *Command) Run(args []string) int { return base.CommandCliError } defer func() { - // The base context has already been cancelled so we shouldn't use it here. + // The base context has already been canceled so we shouldn't use it here. // 1 second is chosen so the shutdown is still responsive and this is a mostly // non critical step since the lock should be released when the session with the // database is closed. diff --git a/internal/db/schema/manager.go b/internal/db/schema/manager.go index 5422f870f..196b9c448 100644 --- a/internal/db/schema/manager.go +++ b/internal/db/schema/manager.go @@ -181,7 +181,7 @@ type rollbacker interface { } // runMigrations passes migration queries to a database driver and manages -// the version and dirty bit. Cancelation or deadline/timeout is managed +// the version and dirty bit. Cancellation or deadline/timeout is managed // through the passed in context. func (b *Manager) runMigrations(ctx context.Context, qp *statementProvider) error { const op = "schema.(Manager).runMigrations" diff --git a/internal/oplog/any_operation.pb.go b/internal/oplog/any_operation.pb.go index 29fee4d1f..1486822d2 100644 --- a/internal/oplog/any_operation.pb.go +++ b/internal/oplog/any_operation.pb.go @@ -88,7 +88,7 @@ type AnyOperation struct { // type_name defines type of operation. TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` - // value are the bytes of a marshalled proto buff. + // value are the bytes of a marshaled proto buff. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // operation_type defines the type of database operation. OperationType OpType `protobuf:"varint,3,opt,name=operation_type,json=operationType,proto3,enum=controller.storage.oplog.v1.OpType" json:"operation_type,omitempty"` diff --git a/internal/proto/local/controller/storage/oplog/v1/any_operation.proto b/internal/proto/local/controller/storage/oplog/v1/any_operation.proto index 9020eb4a6..fe52fd37c 100644 --- a/internal/proto/local/controller/storage/oplog/v1/any_operation.proto +++ b/internal/proto/local/controller/storage/oplog/v1/any_operation.proto @@ -27,7 +27,7 @@ message AnyOperation { // type_name defines type of operation. string type_name = 1; - // value are the bytes of a marshalled proto buff. + // value are the bytes of a marshaled proto buff. bytes value = 2; // operation_type defines the type of database operation. diff --git a/internal/scheduler/additional_verification_test.go b/internal/scheduler/additional_verification_test.go index 20ebecfde..3bc3bba3c 100644 --- a/internal/scheduler/additional_verification_test.go +++ b/internal/scheduler/additional_verification_test.go @@ -111,7 +111,7 @@ func TestSchedulerCancelCtx(t *testing.T) { default: } - // Cancel the base context and all job context's should be cancelled and exit + // Cancel the base context and all job context's should be canceled and exit baseCnl() <-jobDone } diff --git a/internal/scheduler/scheduler.go b/internal/scheduler/scheduler.go index 302d0c90c..5a626b2ce 100644 --- a/internal/scheduler/scheduler.go +++ b/internal/scheduler/scheduler.go @@ -126,8 +126,8 @@ func (s *Scheduler) UpdateJobNextRun(ctx context.Context, name string, nextRunIn // Start begins the scheduling loop that will query the repository for jobs to run and // run them in a goroutine, the scheduler will stop all running jobs and stop requesting -// new jobs once the ctx past in is cancelled. -// The scheduler cannot be started again once the ctx is cancelled, a new scheduler will +// new jobs once the ctx past in is canceled. +// The scheduler cannot be started again once the ctx is canceled, a new scheduler will // need to be instantiated in order to begin scheduling again. func (s *Scheduler) Start(ctx context.Context) error { const op = "scheduler.(Scheduler).Start" diff --git a/internal/scheduler/testing.go b/internal/scheduler/testing.go index 6dc0a1ee9..fc88c0917 100644 --- a/internal/scheduler/testing.go +++ b/internal/scheduler/testing.go @@ -60,7 +60,7 @@ func testJobFn() (func(ctx context.Context) error, chan struct{}, chan struct{}) fn := func(ctx context.Context) error { jobReady <- struct{}{} - // Block until context is cancelled + // Block until context is canceled <-ctx.Done() jobDone <- struct{}{} diff --git a/internal/servers/controller/handlers/marshler.go b/internal/servers/controller/handlers/marshler.go index 4226f6e34..50e21fc79 100644 --- a/internal/servers/controller/handlers/marshler.go +++ b/internal/servers/controller/handlers/marshler.go @@ -5,7 +5,7 @@ import ( "google.golang.org/protobuf/encoding/protojson" ) -// JSONMarshaler provides marshaler used for marshalling all proto as JSON +// JSONMarshaler provides marshaler used for marshaling all proto as JSON // in a format expected by the user facing controller API. func JSONMarshaler() *runtime.JSONPb { return &runtime.JSONPb{ diff --git a/internal/servers/controller/handlers/workers/worker_service.go b/internal/servers/controller/handlers/workers/worker_service.go index 4083a98b6..4135ccf7b 100644 --- a/internal/servers/controller/handlers/workers/worker_service.go +++ b/internal/servers/controller/handlers/workers/worker_service.go @@ -85,7 +85,7 @@ func (ws *workerServiceServer) Status(ctx context.Context, req *pbs.StatusReques for _, jobStatus := range req.GetJobs() { switch jobStatus.Job.GetType() { - // Check for session cancelation + // Check for session cancellation case pbs.JOBTYPE_JOBTYPE_SESSION: si := jobStatus.GetJob().GetSessionInfo() if si == nil { diff --git a/internal/servers/worker/status.go b/internal/servers/worker/status.go index 32270fc94..978b1d750 100644 --- a/internal/servers/worker/status.go +++ b/internal/servers/worker/status.go @@ -172,7 +172,7 @@ func (w *Worker) sendWorkerStatus(cancelCtx context.Context) { if v.closeTime.IsZero() { toClose++ v.connCancel() - w.logger.Info("terminated connection due to cancelation or expiration", "session_id", si.id, "connection_id", k) + w.logger.Info("terminated connection due to cancellation or expiration", "session_id", si.id, "connection_id", k) closeInfo[k] = si.id } } diff --git a/internal/tests/cli/boundary/sessions.bats b/internal/tests/cli/boundary/sessions.bats index ff8da93fb..ed9c4d915 100644 --- a/internal/tests/cli/boundary/sessions.bats +++ b/internal/tests/cli/boundary/sessions.bats @@ -53,7 +53,7 @@ load _helpers [ "$unpriv_sessions" -lt "$admin_sessions" ] } -@test "boundary/session: verify read and cancelation permissions on admin session" { +@test "boundary/session: verify read and cancellation permissions on admin session" { # Find an admin session run login $DEFAULT_LOGIN [ "$status" -eq 0 ] @@ -80,7 +80,7 @@ load _helpers echo $output } -@test "boundary/session: verify read and cancelation permissions on unpriv session" { +@test "boundary/session: verify read and cancellation permissions on unpriv session" { # Find an unpriv session run login $DEFAULT_UNPRIVILEGED_LOGIN [ "$status" -eq 0 ] diff --git a/website/content/docs/api-clients/desktop.mdx b/website/content/docs/api-clients/desktop.mdx index cbfb11a49..abed8d1a0 100644 --- a/website/content/docs/api-clients/desktop.mdx +++ b/website/content/docs/api-clients/desktop.mdx @@ -71,6 +71,6 @@ $ 1. Navigate back to the sessions view and you'll see this session is now active ![](/img/boundary-desktop-active.png) -1. Click `Cancel` to cancel the session and you'll see the status go to `cancelling` briefly, then `terminated` +1. Click `Cancel` to cancel the session and you'll see the status go to `canceling` briefly, then `terminated` ![](/img/boundary-desktop-terminated.png) 1. Navigate back to the CLI and you'll see your SSH session has closed