0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/migrations/tooling/config/schema/plugin_manifest.yml
Gerhard Schlager f0cbb92043
MT: Fix pipe FD leaks, TUI repaint bugs, and shutdown edge cases (#41533)
I did a review pass over the TUI reporter and the step
scheduler/coordinator and found a couple of bugs. The fixes are in
separate commits, roughly by severity.

The important one is in the step coordinator: the progress pipes and the
chunk queue were created (and the parent-side writer ends closed)
outside the fork mutex. The scheduler starts coordinators on their own
threads, so a sibling step could fork in between and its children
inherited those writer FDs. The pipes then never reached EOF until the
foreign children exited — a step that finished in seconds stayed
"running" for as long as a slow partitioned step next to it, and its
forks were never returned to the budget. A leaked chunk-queue writer had
the same effect on `claim`. Everything pipe-related now happens inside
one fork-mutex block.

The rest:

- **TUI repaint**: the leftover-row accounting ignored the permanent
lines that were printed in the same frame, so every step finish scrolled
a spurious blank line at the bottom of the screen, and Ctrl-C left blank
lines before the shell prompt (one per running step).
- **Multi-line notices**: failure notices come from exception messages,
which often contain newlines. An embedded `\n` broke the live-region
cursor math and garbled the display. Notices are now split into one line
per source line.
- **`Tui#close`**: could raise or hang even though it runs inside the
run's `ensure` — a crash in the render thread's own `ensure` (e.g. EPIPE
from a dead output) re-raised through `join`, and a blocked write made
the join wait forever. It now records the error, joins with a timeout,
and restores the cursor best-effort.
- **Scheduler teardown**: `await` reaps all workers before raising (no
zombies, and the error names every crashed worker), `run` joins its
threads and drains the consolidator even when something raises out of
the wait loop, and a SignalException in a coordinator now records a
failure so the summary doesn't render an empty error. Errors from that
teardown land in the same bucket as shard-merge errors, so
`merge_errors` is now called `finalization_errors` and the summary
labels them as errors while finishing up instead of merge failures.
- **Small cleanups**: coalesced progress entries could leak after a late
update, `NO_COLOR=""` is no longer treated as set, a redundant color
branch in the concurrency cell, `fps` validation, a shared helper for
the summary/finished row columns, and `Ansi.truncate` no longer appends
a stray RESET.
- **`--max-parallel-steps`**: the help text now says what the flag
actually does — it caps concurrent worker forks, and a partitioned step
consumes several. No behavior change.
- **ForkManager**: the fork-batching flag was process-global and only
safe because the single caller serializes forking externally. It's
thread-local now.


**Schema sync** (last commit, unrelated to the rest — it just blocked
`disco check` on this branch): core gained a
`user_options.push_notification_level` column and a few new tables since
the last sync. So I ignore the new tables (`nested_hot_post_scores`,
`nested_hot_score_snapshots`, `sidebar_section_localizations`,
`sidebar_url_localizations` — the tables they belong to are ignored
already), regenerate the plugin manifest and the generated schema files,
and pass the new column through in the Discourse converter.
2026-07-22 09:40:42 +02:00

259 lines
7.8 KiB
YAML
Vendored

plugins:
automation:
tables:
- discourse_automation_automations
- discourse_automation_fields
- discourse_automation_pending_automations
- discourse_automation_pending_pms
- discourse_automation_stats
- discourse_automation_user_global_notices
columns: {}
chat:
tables:
- chat_channel_archives
- chat_channel_custom_fields
- chat_channels
- chat_drafts
- chat_mention_notifications
- chat_mentions
- chat_message_custom_fields
- chat_message_interactions
- chat_message_links
- chat_message_reactions
- chat_message_revisions
- chat_message_search_data
- chat_messages
- chat_pinned_messages
- chat_thread_custom_fields
- chat_threads
- chat_webhook_events
- direct_message_channels
- direct_message_users
- incoming_chat_webhooks
- user_chat_channel_memberships
- user_chat_thread_memberships
columns:
user_options:
- chat_announce_new_messages
- chat_email_frequency
- chat_enabled
- chat_header_indicator_preference
- chat_new_message_sound
- chat_quick_reaction_type
- chat_quick_reactions_custom
- chat_send_shortcut
- chat_separate_sidebar_mode
- chat_sound
- dismissed_channel_retention_reminder
- dismissed_dm_retention_reminder
- ignore_channel_wide_mention
- only_chat_push_notifications
- show_thread_title_prompts
discourse-adplugin:
tables:
- ad_plugin_house_ads
- ad_plugin_house_ads_categories
- ad_plugin_house_ads_groups
- ad_plugin_house_ads_routes
- ad_plugin_impressions
columns: {}
discourse-ai:
tables:
- ai_agent_mcp_servers
- ai_agents
- ai_api_audit_logs
- ai_api_request_stats
- ai_artifact_key_values
- ai_artifact_versions
- ai_artifacts
- ai_document_fragments_embeddings
- ai_mcp_oauth_tokens
- ai_mcp_servers
- ai_moderation_settings
- ai_post_image_captions
- ai_posts_embeddings
- ai_secrets
- ai_spam_logs
- ai_summaries
- ai_tool_actions
- ai_tool_secret_bindings
- ai_tools
- ai_topics_embeddings
- chat_message_custom_prompts
- classification_results
- completion_prompts
- discourse_ai_ai_bot_conversation_stars
- embedding_definitions
- inferred_concept_posts
- inferred_concept_topics
- inferred_concepts
- llm_credit_allocations
- llm_credit_daily_usages
- llm_feature_credit_costs
- llm_models
- llm_quota_usages
- llm_quotas
- model_accuracies
- post_custom_prompts
- rag_document_fragments
- shared_ai_conversations
columns:
user_options:
- ai_search_discoveries
- auto_image_caption
discourse-assign:
tables:
- assignments
- silenced_assignments
columns:
groups:
- assignable_level
user_options:
- notification_level_when_assigned
discourse-calendar:
tables:
- calendar_events
- discourse_calendar_disabled_holidays
- discourse_calendar_post_event_dates
- discourse_post_event_events
- discourse_post_event_invitees
- livestream_topic_chat_channels
columns: {}
discourse-data-explorer:
tables:
- data_explorer_queries
- data_explorer_query_groups
- data_explorer_query_stats
columns: {}
discourse-gamification:
tables:
- gamification_leaderboard_scores
- gamification_leaderboards
- gamification_score_events
- gamification_scores
columns:
directory_items:
- gamification_score
discourse-github:
tables:
- github_commits
- github_repos
columns: {}
discourse-policy:
tables:
- policy_users
- post_policies
- post_policy_groups
columns:
user_options:
- policy_email_frequency
discourse-post-voting:
tables:
- post_voting_comment_custom_fields
- post_voting_comments
- post_voting_votes
columns:
posts:
- qa_vote_count
discourse-reactions:
tables:
- discourse_reactions_reaction_users
- discourse_reactions_reactions
columns: {}
discourse-rewind:
tables: []
columns:
user_options:
- discourse_rewind_dismissed_at
- discourse_rewind_enabled
- discourse_rewind_share_publicly
discourse-rss-polling:
tables:
- discourse_rss_polling_poll_attempts
- discourse_rss_polling_rss_feeds
columns: {}
discourse-solved:
tables:
- discourse_solved_shared_issues
- discourse_solved_solved_topics
- discourse_solved_topic_answers
columns:
directory_items:
- solutions
user_options:
- notify_on_solved
discourse-subscriptions:
tables:
- discourse_subscriptions_customers
- discourse_subscriptions_products
- discourse_subscriptions_subscriptions
columns: {}
discourse-templates:
tables:
- discourse_templates_usage_count
columns: {}
discourse-topic-voting:
tables:
- topic_voting_category_settings
- topic_voting_topic_vote_count
- topic_voting_votes
columns: {}
discourse-workflows:
tables:
- discourse_workflows_ai_authoring_sessions
- discourse_workflows_credentials
- discourse_workflows_data_tables
- discourse_workflows_execution_data
- discourse_workflows_execution_stats
- discourse_workflows_executions
- discourse_workflows_variables
- discourse_workflows_webhooks
- discourse_workflows_workflow_call_runs
- discourse_workflows_workflow_dependencies
- discourse_workflows_workflow_publish_history
- discourse_workflows_workflow_versions
- discourse_workflows_workflows
columns: {}
poll:
tables:
- poll_options
- poll_votes
- polls
columns: {}
plugin_checksums:
automation: e69972690991bc04d92b2d161aac8921
chat: 43ee047298d56af4fad013d534155812
discourse-adplugin: 9e52419decf1099c5bc301a90e6cc91a
discourse-affiliate: '08c6e1a851441a082e9be9ddddc63910'
discourse-ai: 4ff4f60e8c1744603f7f8590f8f99447
discourse-assign: 7a7a36e8ac0214e8a6aca1a1ed9899aa
discourse-cakeday: a5bb91366c8dc8d267088eb0c2679187
discourse-calendar: 6a305b06fa9121f17245cefbc726ce20
discourse-captcha: fd538c1338062354276ccfda4cbafd55
discourse-chat-integration: ffa3bf5dba9089491d2fc02971eb96f8
discourse-data-explorer: fb71ab79dbe07af481ba147ea526406f
discourse-gamification: 633256e241b030fddcc059076f7474f8
discourse-github: 3bd17b2c09828e232e7565edbf2c746f
discourse-graphviz: 8a1835520fbf8f7f5d1ef8a25d737e20
discourse-lazy-videos: a916a4f265d1cc6f99a3e53f5bcd1e9e
discourse-local-dates: 18d3ec627bf8546fe13bae24c6a5bb6c
discourse-microsoft-auth: 3a95a5b50edc156ad06f40aadda7d6bc
discourse-narrative-bot: '086bde6a2d7bdddf802800977eb727ac'
discourse-oauth2-basic: a9151339b643380530db0eb6548bac36
discourse-patreon: f0113218c1d5b0d127a6021c5a49d2af
discourse-policy: 41786c59418426f1933f8b95f6c00e18
discourse-post-voting: ece13b87f2fbac3e64f8aa3abe07fe3d
discourse-reactions: e9de82d2ebb48eb434be2b646c7fec26
discourse-rewind: 1e0f2acf6e8409f2d2f011e14405fa06
discourse-rss-polling: 526db84c3d2ade0fa03497031fea2333
discourse-solved: 67743e14f4c5c2fae4487193c374e429
discourse-subscriptions: 05eb12877a6a842a290a98fa0e70d462
discourse-templates: a131c89a3e2b765f1eb6ec811c0fecea
discourse-topic-voting: 5464e186402b9589d71f338c704a7d21
discourse-user-notes: 4c1e04fac5708b51c1b09bd8ed0d786c
discourse-workflows: 46b2e6fd1e8668786b498f0c06846f70
discourse-zendesk-plugin: b78b305590ffedda38455574a19fdd38
poll: e481f2cfa0e7c22778dee12a1e9c33c6
styleguide: 0fd92e5ef0c99ee047f206961a587544
failed_plugins: []
incomplete: false