Skip to content

Commit

Permalink
Merge branch 'main' into pg592
Browse files Browse the repository at this point in the history
  • Loading branch information
artemgavrilov authored Jul 16, 2024
2 parents 3c8549e + c796995 commit 6fdb761
Show file tree
Hide file tree
Showing 59 changed files with 1,740 additions and 251 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
# Order is important; the last matching pattern takes the most precedence.

* @artemgavrilov @darkfronza
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug Report
description: File a bug report
labels: ["bug"]
assignees: []
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please provide as much information as possible, it will help us to address this problem faster.
- type: textarea
id: description
attributes:
label: Description
description: Please describe the problem.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Results
description: What did you expect to happen?
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Results
description: What actually happened?
validations:
required: true
- type: textarea
id: version
attributes:
label: Version
description: What version of PostgreSQL and pg_stat_monitor are you running?
placeholder: PostgreSQL 16.2, pg_stat_monitor v2.0.4
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Which steps do we need to take to reproduce this error?
- type: textarea
id: logs
attributes:
label: Relevant logs
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: Shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow [Percona Community Code of Conduct](https://github.com/percona/community/blob/main/content/contribute/coc.md)
options:
- label: I agree to follow Percona Community Code of Conduct
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Forum
url: https://forums.percona.com/
about: Please join our forums for general questions ans discussions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Feature Request
description: Suggest an idea for this project
labels: ["feature"]
assignees: []
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an idea to make pg_stat_monitor better! Please complete the below form to ensure we have all the details to get things started.
- type: textarea
id: description
attributes:
label: Description
description: Description of the feature and of the problem it solves.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Suggested solution
description: A concise description of your preferred solution.
- type: textarea
id: context
attributes:
label: Additional context
description: Any information that may help.
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/percona/community/blob/main/content/contribute/coc.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
49 changes: 49 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Checks
on:
pull_request:

jobs:
cppcheck:
name: Cppcheck
runs-on: ubuntu-22.04

steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
path: src/pg_stat_monitor

- name: Checkout cppcheck sources
uses: actions/checkout@v4
with:
repository: "danmar/cppcheck"
ref: "2.13.4"
path: src/cppcheck

- name: Build and install cppcheck
working-directory: src/cppcheck
run: |
mkdir build
cd build
cmake ..
cmake --build .
sudo cmake --install .
- name: Execute linter check with cppcheck
working-directory: src/pg_stat_monitor
run: |
set -x
cppcheck --enable=all --inline-suppr --template='{file}:{line},{severity},{id},{message}' --error-exitcode=1 --suppress=missingIncludeSystem --suppress=missingInclude --suppress=unmatchedSuppression:pg_stat_monitor.c --check-config .
license:
name: License
runs-on: ubuntu-22.04

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Check license headers
uses: apache/skywalking-eyes/[email protected]
with:
token: "" # Prevent comments
17 changes: 11 additions & 6 deletions .github/workflows/code-coverage-test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: code-coverage-test
on: [pull_request]
on:
pull_request:
push:
branches:
- main

jobs:
build:
name: coverage-test
runs-on: ubuntu-22.04
steps:
- name: Clone postgres repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'postgres/postgres'
ref: 'REL_15_STABLE'
Expand All @@ -28,7 +32,7 @@ jobs:
/usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \
/etc/postgresql
sudo rm -f /usr/bin/pg_config
sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN'
sudo /usr/bin/perl -MCPAN -e 'install IPC::Run'
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim'
- name: Create pgsql dir
Expand Down Expand Up @@ -74,7 +78,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'src/pg_stat_monitor'

Expand Down Expand Up @@ -104,9 +108,10 @@ jobs:
working-directory: src/pg_stat_monitor

- name: Upload
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: ./src/pg_stat_monitor
files: ./pg_stat_monitor.c.gcov,./hash_query.c.gcov,./guc.c.gcov

Expand All @@ -120,7 +125,7 @@ jobs:

- name: Upload logs on fail
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Regressions diff and postgresql log
path: |
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/cppcheck.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/pgxn-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PGXN
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
type: string

jobs:
release:
name: Release
runs-on: ubuntu-22.04
container: pgxn/pgxn-tools
steps:
- name: Validate version tag
run: '[[ ${{ inputs.version }} =~ ^[0-9]+.[0-9]+.[0-9]+ ]]'
shell: bash

- name: Check out
uses: actions/checkout@v4
with:
ref: '${{ inputs.version }}'

- name: Bundle
id: bundle
run: pgxn-bundle

- name: Upload
env:
PGXN_USERNAME: percona
PGXN_PASSWORD: ${{ secrets.PGXN_PERCONA }}
run: pgxn-release
16 changes: 11 additions & 5 deletions .github/workflows/postgresql-11-build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: postgresql-11-build
on: [push]
on:
pull_request:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
build:
name: pg-11-build-test
runs-on: ubuntu-22.04
steps:
- name: Clone postgres repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'postgres/postgres'
ref: 'REL_11_STABLE'
Expand Down Expand Up @@ -71,7 +77,7 @@ jobs:
pg_ctl -D /opt/pgsql/data -l logfile start
- name: Clone pg_stat_monitor repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'src/pg_stat_monitor'

Expand All @@ -96,7 +102,7 @@ jobs:
working-directory: src/pg_stat_monitor

- name: Report on pg_stat_monitor test fail
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: Regressions diff and postgresql log
Expand All @@ -110,7 +116,7 @@ jobs:
make installcheck-world
- name: Report on installcheck-world test suites fail
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: Regressions output files of failed testsuite, and pg log
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/postgresql-11-pgdg-package.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: postgresql-11-pgdg-package
on: [pull_request]
on:
pull_request:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
build:
name: pg-11-pgdg-package-test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Clone pg_stat_monitor repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'src/pg_stat_monitor'

Expand All @@ -33,6 +39,7 @@ jobs:
- name: Change src owner to postgres
run: |
sudo chmod o+rx ~
sudo chown -R postgres:postgres src
- name: Build pg_stat_monitor
Expand All @@ -53,7 +60,7 @@ jobs:
working-directory: src/pg_stat_monitor

- name: Report on test fail
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: Regressions diff and postgresql log
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/postgresql-11-pmm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: postgresql-11-pmm-integration
on: [push]
on:
pull_request:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
build:
Expand All @@ -8,7 +14,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Clone QA Integration repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'Percona-Lab/qa-integration'
ref: 'main'
Expand All @@ -33,7 +39,7 @@ jobs:
run: docker exec pgsql_pgsm_11 cat pmm-agent.log > ./pmm-ui-tests/tests/output/pmm-agent.log

- name: Upload Tests Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() || failure() # run this step even if previous step failed
with:
name: tests-artifact
Expand Down
Loading

0 comments on commit 6fdb761

Please sign in to comment.