Skip to content

Commit d0991f7

Browse files
committed
[public-api] Add linting
1 parent e4aee70 commit d0991f7

15 files changed

+193
-160
lines changed

components/public-api/buf.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: v1
2+
breaking:
3+
use:
4+
- FILE
5+
lint:
6+
use:
7+
- DEFAULT

components/public-api/generate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ COMPONENTS_DIR="$ROOT_DIR"/components
1515
# shellcheck disable=SC1090,SC1091
1616
source "$ROOT_DIR"/scripts/protoc-generator.sh
1717

18+
lint
19+
1820
install_dependencies
1921
go_protoc "$COMPONENTS_DIR" "gitpod/v1"
2022
mkdir -p go/v1

components/public-api/gitpod/v1/prebuilds.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package gitpod.v1;
44

55
option go_package = "github.com/gitpod-io/gitpod/public-api/v1";
66

7-
import "gitpod/v1/pagination.proto";
7+
// import "gitpod/v1/pagination.proto";
88

99
service PrebuildsService {
1010

components/public-api/gitpod/v1/workspaces.proto

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,38 +172,38 @@ message WorkspaceInstanceStatus {
172172
enum WorkspaceInstancePhase {
173173
// Unknown indicates an issue within the workspace manager in that it cannot determine the actual phase of
174174
// a workspace. This phase is usually accompanied by an error.
175-
UNKNOWN = 0;
175+
WORKSPACE_INSTANCE_PHASE_UNSPECIFIED = 0;
176176

177177
// This will become IMAGE_BUILD
178178
reserved 1;
179179

180180
// Pending means the workspace does not yet consume resources in the cluster, but rather is looking for
181181
// some space within the cluster. If for example the cluster needs to scale up to accomodate the
182182
// workspace, the workspace will be in Pending state until that happened.
183-
PENDING = 2;
183+
WORKSPACE_INSTANCE_PHASE_PENDING = 2;
184184

185185
// Creating means the workspace is currently being created. That includes downloading the images required
186186
// to run the workspace over the network. The time spent in this phase varies widely and depends on the current
187187
// network speed, image size and cache states.
188-
CREATING = 3;
188+
WORKSPACE_INSTANCE_PHASE_CREATING = 3;
189189

190190
// Initializing is the phase in which the workspace is executing the appropriate workspace initializer (e.g. Git
191191
// clone or backup download). After this phase one can expect the workspace to either be Running or Failed.
192-
INITIALIZING = 4;
192+
WORKSPACE_INSTANCE_PHASE_INITIALIZING = 4;
193193

194194
// Running means the workspace is able to actively perform work, either by serving a user through Theia,
195195
// or as a headless workspace.
196-
RUNNING = 5;
196+
WORKSPACE_INSTANCE_PHASE_RUNNING = 5;
197197

198198
// Interrupted is an exceptional state where the container should be running but is temporarily unavailable.
199199
// When in this state, we expect it to become running or stopping anytime soon.
200-
INTERRUPTED = 6;
200+
WORKSPACE_INSTANCE_PHASE_INTERRUPTED = 6;
201201

202202
// Stopping means that the workspace is currently shutting down. It could go to stopped every moment.
203-
STOPPING = 7;
203+
WORKSPACE_INSTANCE_PHASE_STOPPING = 7;
204204

205205
// Stopped means the workspace ended regularly because it was shut down.
206-
STOPPED = 8;
206+
WORKSPACE_INSTANCE_PHASE_STOPPED = 8;
207207
}
208208

209209

@@ -236,9 +236,11 @@ message WorkspaceInstanceAuthentication {
236236
}
237237

238238
enum AdmissionLevel {
239-
// ADMIT_OWNER_ONLY means the workspace can only be accessed using the owner token
240-
ADMIT_OWNER_ONLY = 0;
239+
ADMISSION_LEVEL_UNSPECIFIED = 0;
241240

242-
// ADMIT_EVERYONE means the workspace (including ports) can be accessed by everyone.
243-
ADMIT_EVERYONE = 1;
241+
// ADMISSION_LEVEL_OWNER_ONLY means the workspace can only be accessed using the owner token
242+
ADMISSION_LEVEL_OWNER_ONLY = 1;
243+
244+
// ADMISSION_LEVEL_EVERYONE means the workspace (including ports) can be accessed by everyone.
245+
ADMISSION_LEVEL_EVERYONE = 2;
244246
}

components/public-api/go/v1/prebuilds.pb.go

Lines changed: 20 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)