Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into PMM-11924-HA-Phase-3-…
Browse files Browse the repository at this point in the history
…PoC-new

# Conflicts:
#	docker-compose.yml
#	managed/cmd/pmm-managed/main.go
#	managed/models/victoriametrics_params.go
#	managed/services/agents/deps.go
#	managed/services/supervisord/logs.go
#	managed/services/supervisord/logs_test.go
#	managed/services/supervisord/supervisord_test.go
  • Loading branch information
BupycHuk committed Sep 18, 2023
2 parents c7ec83a + ffc66f0 commit 6274ea8
Show file tree
Hide file tree
Showing 755 changed files with 30,433 additions and 41,601 deletions.
27 changes: 11 additions & 16 deletions .devcontainer/setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/usr/bin/python2
#!/usr/bin/python3

# See CONTRIBUTING.md.

from __future__ import print_function, unicode_literals
import os
import subprocess
import time


GO_VERSION = os.getenv("GO_VERSION")
if GO_VERSION is None:
raise "GO_VERSION is not set"
raise RuntimeError("GO_VERSION is not set")


def run_commands(commands):
Expand All @@ -25,21 +24,16 @@ def install_packages():
"""Installs required and useful RPM packages."""

run_commands([
# to install man pages
"sed -i '/nodocs/d' /etc/yum.conf",

# reinstall with man pages
"yum reinstall -y yum rpm",

"yum install -y gcc git make pkgconfig glibc-static \
"dnf install -y gcc git make pkgconfig \
vim \
ansible-lint \
mc tmux psmisc lsof which iproute \
bash-completion bash-completion-extras \
bash-completion \
man man-pages \
dh-autoreconf \
openssl-devel \
wget"
wget",

"dnf install -y ansible-lint glibc-static --enablerepo=ol9_codeready_builder"

])


Expand All @@ -51,7 +45,7 @@ def install_go():
"chmod +x /usr/local/bin/gimme"
])

go_version = str(subprocess.check_output("gimme -r " + GO_VERSION, shell=True).strip())
go_version = str(subprocess.check_output("gimme -r " + GO_VERSION, shell=True).strip().decode())

if GO_VERSION == "tip":
run_commands([
Expand Down Expand Up @@ -105,7 +99,8 @@ def main():
make_init()

# do basic setup
setup()
# TODO: fix the setup and revert
# setup()


MARKER = "/tmp/devcontainer-setup-done"
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
* @percona/pmm-review-be
/build/ @atymchuk @percona/pmm-review-be
/admin/ @michal-kralik @percona/pmm-review-be
/admin/ @percona/pmm-review-be
/agent/agents/postgres/ @JiriCtvrtka @percona/pmm-review-be
/agent/runner/ @artemgavrilov @percona/pmm-review-be
/api/ @BupycHuk @percona/pmm-review-be
/docs/api/ @atymchuk @percona/pmm-review-be
/managed/services/checks/ @idoqo @percona/pmm-review-be
/managed/ @percona/pmm-review-be
/managed/services/dbaas @gen1us2k @percona-csalguero @recharte @percona/pmm-review-be
/managed/services/management/dbaas @gen1us2k @percona-csalguero @recharte @percona/pmm-review-be
/managed/services/dbaas @gen1us2k @recharte @percona/pmm-review-be
/managed/services/management/dbaas @gen1us2k @recharte @percona/pmm-review-be
/update/ @BupycHuk @talhabinrizwan @percona/pmm-review-be
/api-tests/ @percona/pmm-review-be
**/go.mod @percona/pmm-review-dependency @percona/pmm-review-be
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@ updates:
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

- package-ecosystem: "gomod"
directory: "/tools"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

- package-ecosystem: "gomod"
directory: "/api-tests/tools"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

- package-ecosystem: "docker"
directory: "/"
Expand Down Expand Up @@ -45,3 +54,6 @@ updates:
directory: "/cli-tests"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
6 changes: 3 additions & 3 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down Expand Up @@ -82,6 +82,7 @@ jobs:
cli-test:
name: CLI Tests
if: false
runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand All @@ -94,7 +95,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down Expand Up @@ -126,7 +127,6 @@ jobs:

- name: Setup tools
run: |
sudo apt-get install -y wget jq
sudo ln -sf /home/runner/go/bin/pmm /usr/bin
sudo chown -R runner:docker /usr/bin/pmm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV
echo "$HOME/gotip/bin" >> $GITHUB_PATH
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependabot
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
name: Enable auto-merge
runs-on: ubuntu-20.04
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
62 changes: 62 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Devcontainer
on:
workflow_dispatch:
inputs:
branch:
description: "The branch to build the devcontainer from"
default: "main"
required: true
type: string
workflow_call:
inputs:
branch:
description: "The branch to build the devcontainer from"
default: "main"
required: true
type: string

jobs:
devcontainer:
name: Build
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
fail-fast: false
permissions:
packages: write

env:
LAB_DEVCONTAINER_IMAGE: perconalab/pmm-server:dev-container
GH_DEVCONTAINER_IMAGE: ghcr.io/percona/pmm:dev-container

steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to ghcr.io registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to docker.io registry
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push to registries
uses: docker/build-push-action@v5
with:
file: ./devcontainer.Dockerfile
push: true
tags: |
${{ env.GH_DEVCONTAINER_IMAGE }}
${{ env.LAB_DEVCONTAINER_IMAGE }}
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: API
uses: readmeio/rdme@v8
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/dockerhub-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Docker Hub Readme
on:
push:
branches:
- main
paths:
- build/docker/server/README.md
workflow_dispatch:

jobs:
updateReadme:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v4

- name: Update Docker Hub Readme for perconalab/pmm-server
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: perconalab/pmm-server
readme-filepath: ./build/docker/server/README.md

- name: Update Docker Hub Readme for percona/pmm-server
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: percona/pmm-server
readme-filepath: ./build/docker/server/README.md
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go release
uses: actions/setup-go@v4
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
interval: 45
timeout: 1200
ignored: "WhiteSource License Check"
ignored: "WhiteSource License Check, WhiteSource Security Check"
ref: ${{ github.event.pull_request.head.sha || github.sha }}

workflow_success:
Expand Down
Loading

0 comments on commit 6274ea8

Please sign in to comment.