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

Remove UpsertVersion, as it does not make sense anymore #2084

Merged
merged 1 commit into from
Sep 25, 2023
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
5 changes: 0 additions & 5 deletions dozer-cli/src/cli/cloud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ pub enum VersionCommand {
/// The version to inspect
version: u32,
},
/// Creates a new version of the application with the given deployment
Create {
/// The deployment of the application to create a new version from
deployment: u32,
},
/// Sets a version as the "current" version of the application
///
/// Current version of an application can be visited without the "/v<version>" prefix.
Expand Down
21 changes: 1 addition & 20 deletions dozer-cli/src/simple/cloud_orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use dozer_types::grpc_types::cloud::{
};
use dozer_types::grpc_types::cloud::{
CreateAppRequest, DeploymentInfo, DeploymentStatusWithHealth, File, ListDeploymentRequest,
SetCurrentVersionRequest, UpsertVersionRequest,
SetCurrentVersionRequest,
};
use dozer_types::log::info;
use dozer_types::prettytable::{row, table};
Expand Down Expand Up @@ -524,25 +524,6 @@ impl SimpleOrchestrator {
let mut client = get_cloud_client(&cloud, cloud_config).await?;

match version {
VersionCommand::Create { deployment } => {
let status = client
.get_status(GetStatusRequest {
app_id: app_id.clone(),
})
.await
.map_err(map_tonic_error)?
.into_inner();
let latest_version = status.versions.into_values().max().unwrap_or(0);

client
.upsert_version(UpsertVersionRequest {
app_id,
version: latest_version + 1,
deployment,
})
.await
.map_err(map_tonic_error)?;
}
VersionCommand::SetCurrent { version } => {
client
.set_current_version(SetCurrentVersionRequest { app_id, version })
Expand Down
9 changes: 0 additions & 9 deletions dozer-types/protos/cloud.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ service DozerCloud {
rpc get_status(GetStatusRequest) returns (GetStatusResponse);
rpc list_deployments(ListDeploymentRequest) returns (ListDeploymentResponse);
rpc list_versions(ListVersionsRequest) returns (ListVersionsResponse);
rpc upsert_version(UpsertVersionRequest) returns (UpsertVersionResponse);
rpc set_current_version(SetCurrentVersionRequest) returns (SetCurrentVersionResponse);
rpc list_files(ListFilesRequest) returns (ListFilesResponse);
rpc get_configuration(GetConfigurationRequest) returns (GetConfigurationResponse);
Expand Down Expand Up @@ -218,14 +217,6 @@ message ListDeploymentResponse {
repeated DeploymentInfo deployments = 2;
}

message UpsertVersionRequest {
string app_id = 1;
uint32 version = 2;
uint32 deployment = 3;
}

message UpsertVersionResponse {}

message SetCurrentVersionRequest {
string app_id = 1;
uint32 version = 2;
Expand Down
Loading