Skip to content

Commit 80ccd92

Browse files
authored
Merge branch 'main' into main
2 parents 9cd774b + e7e1720 commit 80ccd92

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

.github/workflows/blackbox.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ jobs:
2424
with:
2525
php-version: 8.4
2626
coverage: none
27-
27+
- name: Login to Docker Hub
28+
uses: docker/login-action@v3
29+
with:
30+
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
password: ${{ secrets.DOCKERHUB_TOKEN }}
2832
- name: Install dependencies
2933
run: composer install --prefer-dist --no-interaction --no-suggest
3034

.github/workflows/checks.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
with:
1717
path: ~/.composer/cache/files
1818
key: dependencies-code-checks
19-
19+
- name: Login to Docker Hub
20+
uses: docker/login-action@v3
21+
with:
22+
username: ${{ secrets.DOCKERHUB_USERNAME }}
23+
password: ${{ secrets.DOCKERHUB_TOKEN }}
2024
- name: Setup PHP
2125
uses: shivammathur/setup-php@v2
2226
with:

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ jobs:
4848
with:
4949
path: ~/.composer/cache/files
5050
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
51-
51+
- name: Login to Docker Hub
52+
uses: docker/login-action@v3
53+
with:
54+
username: ${{ secrets.DOCKERHUB_USERNAME }}
55+
password: ${{ secrets.DOCKERHUB_TOKEN }}
5256
- name: Setup PHP
5357
uses: shivammathur/setup-php@v2
5458
with:

src/Prometheus/Exception/MetricNotFoundException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace Prometheus\Exception;
44

5-
use Exception;
5+
use RuntimeException;
66

77
/**
88
* Exception thrown if a metric can't be found in the CollectorRegistry.
99
*/
10-
class MetricNotFoundException extends Exception
10+
class MetricNotFoundException extends RuntimeException
1111
{
1212
}

src/Prometheus/Storage/PDO.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ protected function createTables(): void
641641
`time` {$timestamp_type} NOT NULL
642642
);
643643
SQL;
644-
$sqlIndex = "CREATE INDEX `name` ON `{$this->prefix}_summaries`(`name`);";
644+
$sqlIndex = "CREATE INDEX IF NOT EXISTS `name` ON `{$this->prefix}_summaries`(`name`);";
645645
break;
646646

647647
case 'mysql':
@@ -667,7 +667,7 @@ protected function createTables(): void
667667
"time" {$timestamp_type} NOT NULL
668668
);
669669
SQL;
670-
$sqlIndex = "CREATE INDEX \"name\" ON \"{$this->prefix}_summaries\" (\"name\");";
670+
$sqlIndex = "CREATE INDEX IF NOT EXISTS \"name\" ON \"{$this->prefix}_summaries\" (\"name\");";
671671
break;
672672
}
673673

0 commit comments

Comments
 (0)