Skip to content

Commit

Permalink
Remove SMW from playbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooks committed Sep 26, 2024
1 parent 3d783bf commit caf8498
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 42 deletions.
6 changes: 0 additions & 6 deletions src/playbooks/rebuild-smw-and-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,3 @@
tags:
- search-index

- name: Rebuild SemanticMediaWiki data for each wiki
shell: "bash {{ m_deploy }}/smw-rebuild-all.sh > {{ m_logs }}/smw-rebuilddata/smw-rebuild-all.log"
run_once: true
tags:
- smw-data

9 changes: 1 addition & 8 deletions src/roles/create-wiki-wrapper/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,11 @@
include_role:
name: verify-wiki

# Wikis are totally built at this point, but SMW and search need rebuilding
# Not totally sure SMW-rebuild is necessary, but maybe for imported pages?
# Wikis are totally built at this point, but search needs rebuilding
# FIXME #811: Ensure no issues with this on multi-server environments and when
# controller is NOT an app server
- name: (Re-)build search index for each wiki
shell: "bash {{ m_deploy }}/elastic-rebuild-all.sh {{ wiki_id }}"
run_once: true
tags:
- search-index

- name: Rebuild SemanticMediaWiki data for each wiki
shell: "bash {{ m_deploy }}/smw-rebuild-all.sh {{ wiki_id }} > {{ m_logs }}/smw-rebuilddata/smw-rebuild-all.log"
run_once: true
tags:
- smw-data
21 changes: 2 additions & 19 deletions src/roles/mediawiki/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,6 @@
- latest
- skins

# Remove IdeAliases before running composer update. Hopefully this keeps
# this file from showing up in autoload_files.php
#
- name: Remove SMW IdeAliases
file:
state: absent
path: "{{ m_mediawiki }}/extensions/SemanticMediaWiki/includes/IdeAliases.php"

# install doesn't appear to do extensions
- name: Run composer update on MediaWiki for extensions
become: yes
Expand Down Expand Up @@ -445,7 +437,7 @@

- debug: { var: list_of_wikis }

- name: Set fact - initiate empty list of wikis to rebuild smw and search data
- name: Set fact - initiate empty list of wikis to rebuild search data
set_fact:
wikis_to_rebuild_data: []

Expand Down Expand Up @@ -501,7 +493,6 @@
mode: 0755
with_items:
- elastic-rebuild-all.sh
- smw-rebuild-all.sh
- run-all-jobs-now.sh
- refresh-links.sh

Expand All @@ -513,7 +504,6 @@
mode: "{{ m_logs_mode }}"
state: directory
with_items:
- smw-rebuilddata
- search-index
- refresh-links

Expand Down Expand Up @@ -547,7 +537,7 @@
run_once: true
when: docker_skip_tasks is not defined or not docker_skip_tasks

# Wikis are totally built at this point, but SMW and search need rebuilding
# Wikis are totally built at this point, but search needs rebuilding
# FIXME #811: Will this work when controller is not an app server?
- name: "(Re-)build search index for: {{ wikis_to_rebuild_data | join(', ') }}"
shell: 'bash {{ m_deploy }}/elastic-rebuild-all.sh "{{ wikis_to_rebuild_data | join('' '') }}"'
Expand All @@ -557,13 +547,6 @@
tags:
- search-index

- name: "(Re-)build SemanticMediaWiki data for: {{ wikis_to_rebuild_data | join(', ') }}"
shell: 'bash {{ m_deploy }}/smw-rebuild-all.sh "{{ wikis_to_rebuild_data | join('' '') }}" > {{ m_logs }}/smw-rebuilddata/smw-rebuild-all.log'
when: (docker_skip_tasks is not defined or not docker_skip_tasks) and (wikis_to_rebuild_data|length > 0)
run_once: true
tags:
- smw-data

# Run update.php (MediaWiki's database update script) against all wikis. This
# only needs to be done once, since the first app server that runs it will
# update the master database.
Expand Down
4 changes: 2 additions & 2 deletions src/roles/mediawiki/templates/LocalSettings.php.j2
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ $wgVectorUseSimpleSearch = true;

//$wgDefaultUserOptions['useeditwarning'] = 1;

// disable page edit warning (edit warning affect Semantic Forms)
// disable page edit warning (edit warning affect Page Forms)
$wgVectorFeatures['editwarning']['global'] = false;

$wgDefaultUserOptions['rememberpassword'] = 1;
Expand All @@ -598,7 +598,7 @@ $wgMaxImageArea = 1.25e10; // Images on [[Snorkel]] fail without this


// Increase from default setting for large form
// See https://www.mediawiki.org/wiki/Extension_talk:Semantic_Forms/Archive_April_to_June_2012#Error:_Backtrace_limit_exceeded_during_parsing
// See https://www.mediawiki.org/wiki/Extension_talk:Page_Forms/Archive_April_to_June_2012#Error:_Backtrace_limit_exceeded_during_parsing
// If set to 10million, errors are seen when using Edit with form on mission pages like 41S
// ini_set( 'pcre.backtrack_limit', 10000000 ); //10million
ini_set( 'pcre.backtrack_limit', 1000000000 ); //1 billion
Expand Down
7 changes: 0 additions & 7 deletions src/roles/verify-wiki/tasks/import-wiki-sql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,6 @@
when: did_db_import is defined and did_db_import.changed is defined and did_db_import.changed


- name: Setup SMW Store
shell: >
WIKI="{{ wiki_id }}" php "{{ m_mediawiki }}/extensions/SemanticMediaWiki/maintenance/setupStore.php"
run_once: true
when: created_new_wiki


#
# SECTION: update.php
#
Expand Down

0 comments on commit caf8498

Please sign in to comment.