fix: teams, need both guid and thread id format (#7420)

* fix: teams, need both guid and thread id format

* chore: update ee-repo-ref to 576abf6519d1aa12a2b989a58a123501206284fb

This commit updates the EE repository reference after PR #368 was merged in windmill-ee-private.

Previous ee-repo-ref: ae41589212f16ff0cec8516c66227f30e17c5564

New ee-repo-ref: 576abf6519d1aa12a2b989a58a123501206284fb

Automated by sync-ee-ref workflow.

---------

Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
This commit is contained in:
Alexander Petric
2025-12-19 15:07:23 -05:00
committed by GitHub
parent 26afcb5ee8
commit 077995064f
15 changed files with 91 additions and 61 deletions
@@ -46,11 +46,11 @@
]
},
"nullable": [
false,
false,
false,
false,
false,
true,
true,
true,
true,
true,
true,
true
]
@@ -172,6 +172,11 @@
"ordinal": 33,
"name": "datatable",
"type_info": "Jsonb"
},
{
"ordinal": 34,
"name": "teams_team_guid",
"type_info": "Text"
}
],
"parameters": {
@@ -213,6 +218,7 @@
true,
true,
true,
true,
true
]
},
@@ -172,6 +172,11 @@
"ordinal": 33,
"name": "datatable",
"type_info": "Jsonb"
},
{
"ordinal": 34,
"name": "teams_team_guid",
"type_info": "Text"
}
],
"parameters": {
@@ -213,6 +218,7 @@
true,
true,
true,
true,
true
]
},
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n workspace_id,\n slack_team_id,\n teams_team_id,\n teams_team_name,\n slack_name,\n slack_command_script,\n teams_command_script,\n slack_email,\n slack_oauth_client_id,\n slack_oauth_client_secret,\n auto_invite_domain,\n auto_invite_operator,\n auto_add,\n customer_id,\n plan,\n webhook,\n deploy_to,\n ai_config,\n error_handler,\n error_handler_extra_args,\n error_handler_muted_on_cancel,\n large_file_storage,\n datatable,\n ducklake,\n git_sync,\n deploy_ui,\n default_app,\n default_scripts,\n mute_critical_alerts,\n color,\n operator_settings,\n git_app_installations,\n auto_add_instance_groups,\n auto_add_instance_groups_roles\n FROM\n workspace_settings\n WHERE\n workspace_id = $1\n ",
"query": "\n SELECT\n workspace_id,\n slack_team_id,\n teams_team_id,\n teams_team_name,\n teams_team_guid,\n slack_name,\n slack_command_script,\n teams_command_script,\n slack_email,\n slack_oauth_client_id,\n slack_oauth_client_secret,\n auto_invite_domain,\n auto_invite_operator,\n auto_add,\n customer_id,\n plan,\n webhook,\n deploy_to,\n ai_config,\n error_handler,\n error_handler_extra_args,\n error_handler_muted_on_cancel,\n large_file_storage,\n datatable,\n ducklake,\n git_sync,\n deploy_ui,\n default_app,\n default_scripts,\n mute_critical_alerts,\n color,\n operator_settings,\n git_app_installations,\n auto_add_instance_groups,\n auto_add_instance_groups_roles\n FROM\n workspace_settings\n WHERE\n workspace_id = $1\n ",
"describe": {
"columns": [
{
@@ -25,151 +25,156 @@
},
{
"ordinal": 4,
"name": "teams_team_guid",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "slack_name",
"type_info": "Varchar"
},
{
"ordinal": 5,
"ordinal": 6,
"name": "slack_command_script",
"type_info": "Varchar"
},
{
"ordinal": 6,
"ordinal": 7,
"name": "teams_command_script",
"type_info": "Text"
},
{
"ordinal": 7,
"ordinal": 8,
"name": "slack_email",
"type_info": "Varchar"
},
{
"ordinal": 8,
"ordinal": 9,
"name": "slack_oauth_client_id",
"type_info": "Varchar"
},
{
"ordinal": 9,
"ordinal": 10,
"name": "slack_oauth_client_secret",
"type_info": "Varchar"
},
{
"ordinal": 10,
"ordinal": 11,
"name": "auto_invite_domain",
"type_info": "Varchar"
},
{
"ordinal": 11,
"ordinal": 12,
"name": "auto_invite_operator",
"type_info": "Bool"
},
{
"ordinal": 12,
"ordinal": 13,
"name": "auto_add",
"type_info": "Bool"
},
{
"ordinal": 13,
"ordinal": 14,
"name": "customer_id",
"type_info": "Varchar"
},
{
"ordinal": 14,
"ordinal": 15,
"name": "plan",
"type_info": "Varchar"
},
{
"ordinal": 15,
"ordinal": 16,
"name": "webhook",
"type_info": "Text"
},
{
"ordinal": 16,
"ordinal": 17,
"name": "deploy_to",
"type_info": "Varchar"
},
{
"ordinal": 17,
"ordinal": 18,
"name": "ai_config",
"type_info": "Jsonb"
},
{
"ordinal": 18,
"ordinal": 19,
"name": "error_handler",
"type_info": "Varchar"
},
{
"ordinal": 19,
"ordinal": 20,
"name": "error_handler_extra_args",
"type_info": "Json"
},
{
"ordinal": 20,
"ordinal": 21,
"name": "error_handler_muted_on_cancel",
"type_info": "Bool"
},
{
"ordinal": 21,
"ordinal": 22,
"name": "large_file_storage",
"type_info": "Jsonb"
},
{
"ordinal": 22,
"ordinal": 23,
"name": "datatable",
"type_info": "Jsonb"
},
{
"ordinal": 23,
"ordinal": 24,
"name": "ducklake",
"type_info": "Jsonb"
},
{
"ordinal": 24,
"ordinal": 25,
"name": "git_sync",
"type_info": "Jsonb"
},
{
"ordinal": 25,
"ordinal": 26,
"name": "deploy_ui",
"type_info": "Jsonb"
},
{
"ordinal": 26,
"ordinal": 27,
"name": "default_app",
"type_info": "Varchar"
},
{
"ordinal": 27,
"ordinal": 28,
"name": "default_scripts",
"type_info": "Jsonb"
},
{
"ordinal": 28,
"ordinal": 29,
"name": "mute_critical_alerts",
"type_info": "Bool"
},
{
"ordinal": 29,
"ordinal": 30,
"name": "color",
"type_info": "Varchar"
},
{
"ordinal": 30,
"ordinal": 31,
"name": "operator_settings",
"type_info": "Jsonb"
},
{
"ordinal": 31,
"ordinal": 32,
"name": "git_app_installations",
"type_info": "Jsonb"
},
{
"ordinal": 32,
"ordinal": 33,
"name": "auto_add_instance_groups",
"type_info": "TextArray"
},
{
"ordinal": 33,
"ordinal": 34,
"name": "auto_add_instance_groups_roles",
"type_info": "Jsonb"
}
@@ -187,6 +192,7 @@
true,
true,
true,
true,
false,
true,
true,
@@ -216,5 +222,5 @@
true
]
},
"hash": "95fa60eb45228ff289655fc676991f4e90d237799f6817f292eb1391694164c7"
"hash": "3c53de373b9f1034b5f43002bf4715e12ddc641f4ca52efe0335719fa9461bb0"
}
@@ -1,16 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "\n UPDATE workspace_settings\n SET teams_team_id = $1, teams_team_name = $2\n WHERE workspace_id = $3\n AND NOT EXISTS (\n SELECT 1 FROM workspace_settings\n WHERE teams_team_id = $1 AND workspace_id <> $2\n )\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Text"
]
},
"nullable": []
},
"hash": "551c78392919e18019bb0a4344fb1bd45853bf5b72e0ab991e0e61fedcfb42fc"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE workspace_settings\n SET teams_team_id = null, teams_team_name = null WHERE workspace_id = $1",
"query": "UPDATE workspace_settings\n SET teams_team_id = null, teams_team_name = null, teams_team_guid = null WHERE workspace_id = $1",
"describe": {
"columns": [],
"parameters": {
@@ -10,5 +10,5 @@
},
"nullable": []
},
"hash": "23c37d36e16251763fabf194e41de63612a7506cc0671b0eb83e528c1c839db4"
"hash": "62a625902ab1507f198bc9b12f2fea8398ec3905699ebf0e28cdfc85c0de4615"
}
@@ -18,8 +18,8 @@
"Left": []
},
"nullable": [
false,
true
true,
false
]
},
"hash": "b3dbdfb50ee8118bdaed3164b210cb549a34b96554ae1872355b90304f5dcb76"
@@ -59,7 +59,9 @@
"failure",
"command",
"approval",
"preprocessor"
"preprocessor",
"schedule_handler_old",
"dynamic_skip"
]
}
}
@@ -0,0 +1,17 @@
{
"db_name": "PostgreSQL",
"query": "\n UPDATE workspace_settings\n SET teams_team_id = $1, teams_team_name = $2, teams_team_guid = $3\n WHERE workspace_id = $4\n AND NOT EXISTS (\n SELECT 1 FROM workspace_settings\n WHERE teams_team_id = $1 AND workspace_id <> $4\n )\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Text",
"Text"
]
},
"nullable": []
},
"hash": "f034f7b0118ad467c7399c5554eb916d5a9716ca0d638e3bc65509b476db378e"
}
+1 -1
View File
@@ -1 +1 @@
6edb5e9ea22b88f81dc9ee2741ea679d9b22f61c
576abf6519d1aa12a2b989a58a123501206284fb
@@ -0,0 +1 @@
ALTER TABLE workspace_settings DROP COLUMN teams_team_guid;
@@ -0,0 +1,3 @@
-- Add teams_team_guid column to store the GUID (used for MS Graph API calls)
-- The existing teams_team_id column stores the internal_id (used for webhook matching)
ALTER TABLE workspace_settings ADD COLUMN teams_team_guid TEXT;
+2
View File
@@ -2167,6 +2167,8 @@ paths:
type: string
teams_team_name:
type: string
teams_team_guid:
type: string
auto_invite_domain:
type: string
auto_invite_operator:
+3
View File
@@ -233,6 +233,8 @@ pub struct WorkspaceSettings {
#[serde(skip_serializing_if = "Option::is_none")]
pub teams_team_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub teams_team_guid: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub slack_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub slack_command_script: Option<String>,
@@ -532,6 +534,7 @@ async fn get_settings(
slack_team_id,
teams_team_id,
teams_team_name,
teams_team_guid,
slack_name,
slack_command_script,
teams_command_script,
@@ -85,7 +85,7 @@
let customHandlerSchema: Schema | undefined = $state()
let slackHandlerSchema: Schema | undefined = $state()
let teams_team_name: string | undefined = $state(undefined)
let teams_team_id: string | undefined = $state(undefined)
let teams_team_guid: string | undefined = $state(undefined)
let workspaceConnectedToSlack: boolean | undefined = $state(undefined)
let workspaceConnectedToTeams: boolean | undefined = $state(undefined)
@@ -113,7 +113,7 @@
}
if (workspaceConnectedToTeams) {
teams_team_name = settings.teams_team_name
teams_team_id = settings.teams_team_id
teams_team_guid = settings.teams_team_guid
}
}
@@ -486,7 +486,7 @@
containerClass="flex-grow"
minWidth="200px"
placeholder="Search Teams channels"
teamId={teams_team_id}
teamId={teams_team_guid}
selectedChannel={handlerExtraArgs['channel']
? {
channel_id: handlerExtraArgs['channel'],