Skip to content

Commit 70027fa

Browse files
authored
Merge pull request #292 from keymanapp/chore/merge-master-to-staging-a19s9
chore: Merge master to staging for Sprint A19S9
2 parents c2f4d1c + 33dbe41 commit 70027fa

3 files changed

Lines changed: 95 additions & 0 deletions

File tree

.github/multi-labeler.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: v1
2+
3+
# This file adds labels based on the scopes in
4+
# keymanapp/keyman:resources/scopes/commit-types.json
5+
# Currently it must be manually kept up to date. Not all labels are added, only
6+
# common ones. The others are commented out.
7+
8+
9+
labels:
10+
#
11+
# conventional commit / semantic PR styles
12+
#
13+
14+
- label: 'auto'
15+
matcher:
16+
title: '^auto(\(|:)'
17+
- label: 'change'
18+
matcher:
19+
title: '^change(\(|:)'
20+
- label: 'chore'
21+
matcher:
22+
title: '^chore(\(|:)'
23+
- label: 'docs'
24+
matcher:
25+
title: '^docs(\(|:)'
26+
- label: 'feat'
27+
matcher:
28+
title: '^feat(\(|:)'
29+
- label: 'fix'
30+
matcher:
31+
title: '^fix(\(|:)'
32+
- label: 'maint'
33+
matcher:
34+
title: '^maint(\(|:)'
35+
- label: 'refactor'
36+
matcher:
37+
title: '^refactor(\(|:)'
38+
- label: 'style'
39+
matcher:
40+
title: '^style(\(|:)'
41+
- label: 'test'
42+
matcher:
43+
title: '^test(\(|:)'

.github/workflows/labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
- pull_request
4+
5+
jobs:
6+
triage:
7+
if: github.repository == 'keymanapp/api.keyman.com'
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Update labels based on PR title
11+
id: labeler
12+
uses: fuxingloh/multi-labeler@f5bd7323b53b0833c1e4ed8d7b797ae995ef75b4 # v2.0.1
13+
with:
14+
github-token: ${{secrets.GITHUB_TOKEN}}
15+
config-path: .github/multi-labeler.yml

tools/db/build/build.inc.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ function BuildDatabase($DBDataSources, $schema, $do_force) {
8282
$this->sqlrun(dirname(__FILE__)."/full-text-indexes.sql", false, false);
8383
$this->sqlrun(dirname(__FILE__)."/search-queries.sql");
8484

85+
$this->waitForFullTextIndexing();
86+
8587
// Run scripts for all views automatically
8688
$scripts = glob(__DIR__ . '/v_*.sql');
8789
foreach($scripts as $script) {
@@ -107,6 +109,41 @@ function BuildDatabase($DBDataSources, $schema, $do_force) {
107109
return true;
108110
}
109111

112+
private function waitForFullTextIndexing() {
113+
$dci = new DatabaseConnectionInfo();
114+
115+
try {
116+
$mssql = new PDO(
117+
$dci->getConnectionString(),
118+
$this->schema,
119+
$dci->getPassword(),
120+
[ "CharacterSet" => "UTF-8" ]);
121+
$mssql->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
122+
$mssql->setAttribute( PDO::SQLSRV_ATTR_DIRECT_QUERY, true);
123+
$mssql->setAttribute( PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8 );
124+
}
125+
catch( PDOException $e ) {
126+
die( "Error connecting to SQL Server: " . $e->getMessage() );
127+
}
128+
129+
$stmt = $mssql->prepare("select * from sys.fulltext_indexes where has_crawl_completed=0");
130+
if(!$stmt->execute()) {
131+
die( "Error checking Full Text Indexing status" );
132+
}
133+
$data = $stmt->fetchAll();
134+
135+
while(count($data) > 0) {
136+
echo "Full Text Indexing not complete, waiting 3 seconds\n";
137+
sleep(3);
138+
if(!$stmt->execute()) {
139+
die( "Error checking Full Text Indexing status" );
140+
}
141+
$data = $stmt->fetchAll();
142+
}
143+
144+
echo "Full Text Indexing is now complete\n";
145+
}
146+
110147
function buildDBDataSources($data_path, DBDataSources $DBDataSources) {
111148
$sql = '';
112149

0 commit comments

Comments
 (0)