Skip to content

Commit 5583b56

Browse files
authored
Simplify registry service component updates & repo (#2850)
* Simplify registry service component updates & repo * update openapi * fix
1 parent 1d39d95 commit 5583b56

File tree

20 files changed

+272
-621
lines changed

20 files changed

+272
-621
lines changed

cli/golem-cli/src/command_handler/app/deploy_diff.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,6 @@ fn normalized_diff_deployment(
732732
Some(component) => diff::Component {
733733
metadata: match component.metadata.as_value() {
734734
Some(metadata) => diff::ComponentMetadata {
735-
version: metadata.version.clone(),
736735
env: safe_env(&metadata.env),
737736
config_vars: metadata.config_vars.clone(),
738737
}

cli/golem-cli/src/command_handler/component/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,6 @@ impl ComponentCommandHandler {
10101010

10111011
Ok(diff::Component {
10121012
metadata: diff::ComponentMetadata {
1013-
version: Some("".to_string()), // TODO: atomic
10141013
env: properties
10151014
.env
10161015
.iter()

golem-api-grpc/proto/golem/component/component.proto

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ message Component {
2929
golem.common.EnvironmentId environment_id = 6;
3030
google.protobuf.Timestamp created_at = 7;
3131
repeated golem.component.InitialComponentFile files = 8;
32-
repeated golem.component.InitialComponentFile original_files = 9;
3332
repeated golem.component.PluginInstallation installed_plugins = 10;
3433
golem.common.AccountId account_id = 11;
3534
map<string, string> env = 12;
36-
map<string, string> original_env = 13;
37-
map<string, string> config_vars = 14;
38-
map<string, string> original_config_vars = 15;
39-
repeated LocalAgentConfigEntry local_agent_config = 16;
40-
golem.common.Hash wasm_hash = 17;
41-
golem.common.ApplicationId application_id = 18;
42-
golem.common.Hash hash = 19;
43-
string transformed_object_store_key = 20;
44-
string object_store_key = 21;
35+
map<string, string> config_vars = 13;
36+
repeated LocalAgentConfigEntry local_agent_config = 14;
37+
golem.common.Hash wasm_hash = 15;
38+
golem.common.ApplicationId application_id = 16;
39+
golem.common.Hash hash = 17;
40+
string object_store_key = 18;
4541
}

golem-common/src/base_model/component.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,9 @@ declare_structs! {
131131
pub metadata: ComponentMetadata,
132132
pub created_at: chrono::DateTime<chrono::Utc>,
133133
pub files: Vec<InitialComponentFile>,
134-
pub original_files: Vec<InitialComponentFile>,
135134
pub installed_plugins: Vec<InstalledPlugin>,
136135
pub env: BTreeMap<String, String>,
137-
pub original_env: BTreeMap<String, String>,
138136
pub config_vars: BTreeMap<String, String>,
139-
pub original_config_vars: BTreeMap<String, String>,
140137
pub local_agent_config: Vec<LocalAgentConfigEntry>,
141138
pub wasm_hash: diff::Hash,
142139
}

golem-common/src/model/component.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ impl ComponentDto {
2222
pub fn to_diffable(&self) -> diff::Component {
2323
diff::Component {
2424
metadata: diff::ComponentMetadata {
25-
version: Some("".to_string()), // TODO: atomic
2625
env: self
2726
.env
2827
.iter()

golem-common/src/model/diff/component.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ impl Diffable for ComponentFile {
9999
#[derive(Debug, Clone, PartialEq, Serialize)]
100100
#[serde(rename_all = "camelCase")]
101101
pub struct ComponentMetadata {
102-
#[serde(skip_serializing_if = "Option::is_none")]
103-
pub version: Option<String>,
104102
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
105103
pub env: BTreeMap<String, String>,
106104
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
ALTER TABLE component_revisions
2-
ADD local_agent_config BYTEA NOT NULL;
2+
ADD local_agent_config BYTEA NOT NULL;
3+
4+
ALTER TABLE component_revisions
5+
DROP COLUMN original_env;
6+
7+
ALTER TABLE component_revisions
8+
DROP COLUMN original_config_vars;
9+
10+
ALTER TABLE component_revisions
11+
DROP COLUMN transformed_object_store_key;
12+
13+
ALTER TABLE component_revisions
14+
DROP COLUMN version;
15+
16+
DROP TABLE original_component_files;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
ALTER TABLE component_revisions
22
ADD local_agent_config BYTEA NOT NULL;
3+
4+
ALTER TABLE component_revisions
5+
DROP COLUMN original_env;
6+
7+
ALTER TABLE component_revisions
8+
DROP COLUMN original_config_vars;
9+
10+
ALTER TABLE component_revisions
11+
DROP COLUMN transformed_object_store_key;
12+
13+
ALTER TABLE component_revisions
14+
DROP COLUMN version;
15+
16+
DROP TABLE original_component_files;

golem-registry-service/src/model/component.rs

Lines changed: 0 additions & 147 deletions
This file was deleted.

golem-registry-service/src/model/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
pub mod api_definition;
16-
pub mod component;
1716
pub mod component_slug;
1817
pub mod login;
1918
pub mod security_scheme;

0 commit comments

Comments
 (0)