Skip to content

Commit

Permalink
Fix cloud update synchronization (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Aug 20, 2024
1 parent 637c4ab commit 266b3a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/core/lib/core/clients/console.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule Core.Clients.Console do

@update_svc_q """
mutation Update($id: ID!, $attributes: ServiceUpdateAttributes!) {
updateServiceDeployment(id: $id) {
updateServiceDeployment(id: $id, attributes: $attributes) {
id
}
}
Expand Down
5 changes: 2 additions & 3 deletions apps/core/lib/core/services/cloud/workflow.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ defmodule Core.Services.Cloud.Workflow do

def sync(%ConsoleInstance{external_id: id} = instance) when is_binary(id) do
instance = Repo.preload(instance, [:cluster, :postgres])
Console.update_service(console(), %{
size: instance.size,
Console.update_service(console(), id, %{
configuration: Configuration.build(instance)
}, id)
})
end
def sync(_), do: :ok

Expand Down
2 changes: 1 addition & 1 deletion apps/graphql/lib/graphql/schema/cloud.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule GraphQl.Schema.Cloud do
end

input_object :console_instance_update_attributes do
field :size, :console_size
field :size, :console_size
field :configuration, :console_configuration_update_attributes
end

Expand Down

0 comments on commit 266b3a9

Please sign in to comment.