Skip to content

Commit

Permalink
Resolve conflict and other
Browse files Browse the repository at this point in the history
  • Loading branch information
ptichoid committed Sep 18, 2024
2 parents 1021ee8 + bcd9f45 commit c26762c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM registry.access.redhat.com/ubi9/python-311:1-62.1717085982
FROM registry.access.redhat.com/ubi9/python-311:1-72.1724040033

WORKDIR /app

COPY --chown=1001:0 *.py requirements.txt ./
COPY --chown=1001:0 . .

USER 1001

RUN pip install --no-cache-dir -r requirements.txt

CMD sleep 60
CMD find . -name "*.py" -exec python {} \; && sleep 60
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ Eyes-On-Docs
************
Scripts gathering HC3.0 PRs, issues and docs info from Github and Gitea. Scripts are works both for OTC and Swiss clouds in a one run. Data store in three Postgres databases: **_CSV_** is for a service tables and open PRs, failed Zuul PRs, issues and commits updates, **_ORPH_** is a dedicated DB special for orphan PRs

1) **otc_services_dict.py:** service script gathering metadata for service, its full names, categories and types. Should be run first, since all of the following scripts are relay on it in terms of repo names, service titles and squad names.
2) **gitea_info.py:** this script is using for open & orphan PRs data collecting
3) **github_info.py:** add info regarding child PRs in Github
4) **failed_zuul.py:** collecting info about PRs which checks in Zuul has been failed
5) **open_issues.py:** this script gather info regarding all open issues both from Gitea and Gitnub
6) **last_commit_info.py:** this script gather and calculate date of the last update of a prospective doc for all the services and types of docs (user manual, API reference and so on)
7) **scheduler.py:** this script checking postgres for orphans, unattended issues and outdated docs, and send notifications to Zulip, via OTC Bot. Runs as cronjob (see 'system-config' repo)
1) **eod_1_otc_services_dict.py:** service script gathering metadata for service, its full names, categories and types.
Should be run first, since all of the following scripts are relay on it in terms of repo names, service titles and squad names.
2) **eod_2_gitea_info.py:** this script is using for open & orphan PRs data collecting
3) **eod_3_github_info.py:** add info regarding child PRs in Github
4) **eod_4_failed_zuul.py:** collecting info about PRs which checks in Zuul has been failed
5) **eod_5_open_issues.py:** this script gather info regarding all open issues both from Gitea and Gitnub
6) **eod_6_last_commit_info.py:** this script gather and calculate date of the last update of a prospective doc for all
the services and types of docs (user manual, API reference and so on)
7) **eod_7_request_changes.py:** this script gather info about PRs where changes has been requested, from both
sides: OTC squads and upstream team, which is generating documentation
8) **eod_8_ecosystem_issue.py:** script for gathering issues for Eco Squad only
9) **eod_9_scheduler.py:** this script checking postgres for orphans, unattended issues and outdated docs, and send
notifications to Zulip, via OTC Bot. Runs as cronjob (see 'system-config' repo)
Postgres database names, table names, Gitea & Github organization names and access tokens are store in environment variables.

Notification schedule
Expand All @@ -28,7 +34,7 @@ Notification anatomy
********************
This is how typical notification looks like. Since notifications do not differ in their structure, we can give an example of one of them.

![Notification anatomy](https://github.com/opentelekomcloud-infra/grafana-docs-monitoring/blob/documentation/alert_anatomy.PNG)
![Notification anatomy](https://github.com/opentelekomcloud-infra/eyes_on_docs/blob/documentation/alert_anatomy.PNG)

**Alert name:** name of an alert. Could be *Orphaned PRs Alert,* *Outdated Documents Alert* or *Open Issues Alert.*\
**Alert summary:** what happened, what is this alert about.\
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
certifi==2024.7.4
cffi==1.15.1
charset-normalizer==3.1.0
cryptography==42.0.4
cryptography==43.0.1
idna==3.7
psycopg2==2.9.6
pycparser==2.21
Expand Down
3 changes: 3 additions & 0 deletions scripts/eod_9_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"Database Squad": {"stream": "Database Squad", "topic": "Doc alerts"},
"Big Data and AI Squad": {"stream": "bigdata & ai", "topic": "helpcenter_alerts"},
"Compute Squad": {"stream": "compute", "topic": "hc_alerts topic"},
"Security Services Squad": {"stream": "security services", "topic": "Doc Alerts"},
"CMS Squad": {"stream": "CMS Squad", "topic": "Doc alerts"},
"PaaS Squad": {"stream": "PaaS Squad", "topic": "Doc alerts"},
"Storage Squad": {"stream": "Storage Squad", "topic": "helpcenter_alerts"},
"Container squad": {"stream": "Container squad", "topic": "Doc alerts"},
"Network Squad": {"stream": "network", "topic": "Alerts_HelpCenter"}
Expand Down
20 changes: 10 additions & 10 deletions zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---

- job:
name: grafana-docs-monitoring-build-image
name: eyes-on-docs-build-image
parent: otc-build-container-image
description: Build grafana-docs-monitoring container image
provides: grafana-docs-monitoring-image
vars: &gdm_image_vars
description: Build eyes-on-docs container image
provides: eyes-on-docs-image
vars: &eod_image_vars
container_images:
- context: .
registry: quay.io
repository: opentelekomcloud/grafana-docs-monitoring
repository: opentelekomcloud/eyes-on-docs
tags:
&imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"

- job:
name: grafana-docs-monitoring-upload-image
name: eyes-on-docs-upload-image
parent: otcinfra-upload-container-images
vars: *gdm_image_vars
vars: *eod_image_vars

- project:
merge-mode: squash-merge
Expand All @@ -25,10 +25,10 @@
node_version: 18
check:
jobs:
- grafana-docs-monitoring-build-image
- eyes-on-docs-build-image
gate:
jobs:
- grafana-docs-monitoring-upload-image
- eyes-on-docs-upload-image
release:
jobs:
- grafana-docs-monitoring-upload-image
- eyes-on-docs-upload-image

0 comments on commit c26762c

Please sign in to comment.