Skip to content

Commit

Permalink
Run pre commit hooks (#432)
Browse files Browse the repository at this point in the history
* Return removed staging CA for letsenrypt

* Fix missing $

* Remove PAYMENTS_AUTORECHARGE_DEFAULT_MIN_BALANCE

* Run pre-commit hooks
  • Loading branch information
YuryHrytsuk authored Nov 14, 2023
1 parent d7e8f38 commit 7964814
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 17 deletions.
2 changes: 0 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@

# files and folders recursively
* @mrnicegyu11 @YuryHrytsuk


2 changes: 2 additions & 0 deletions scripts/s3BucketOptions/setBucketCORS.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"ignore",
".*Adding certificate verification is strongly advised.*",
)


#
def main(
destinationbucketname: str,
Expand Down
2 changes: 2 additions & 0 deletions scripts/s3BucketOptions/setBucketLifecyclePolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"ignore",
".*Adding certificate verification is strongly advised.*",
)


#
def main(
destinationbucketname: str,
Expand Down
2 changes: 2 additions & 0 deletions scripts/s3BucketOptions/setBucketLifecyclePolicyCEPH.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"ignore",
".*Adding certificate verification is strongly advised.*",
)


#
def main(
destinationbucketname: str,
Expand Down
2 changes: 1 addition & 1 deletion scripts/s3RobustCopy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
)
#


############
############ Common functionality
def isObjectPresentOnBucket(botobucket, filepath, allObjectsBucket=None):
Expand Down Expand Up @@ -223,7 +224,6 @@ def main(
decryption: bool = typer.Option(False, "--decryption"),
password: str = "",
):

if nooverwrites:
print("CONFIG: WILL NOT OVERWRITE ANY FILES.")
if (encryption or decryption) and password != "":
Expand Down
4 changes: 2 additions & 2 deletions services/admin-panels/data/ProjectsQuestions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "",
"language": "python",
"name": "python3"
"name": ""
},
"language_info": {
"codemirror_mode": {
Expand Down
1 change: 0 additions & 1 deletion services/batman-panels/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ def runTableGeneration():
assert len(branches) == len(test_repo_ids)

for gitlabID_iter in range(len(test_repo_ids)): # e2e p2e opse2e ...

gitlabID = test_repo_ids[gitlabID_iter]
gitlabName = test_repo_names[gitlabID_iter]
dictListTestResultsNow = []
Expand Down
32 changes: 23 additions & 9 deletions services/monitoring/grafana/scripts/import.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import json
import os
import time
from pathlib import Path
import warnings
from pathlib import Path

import requests
import typer
Expand Down Expand Up @@ -180,7 +180,9 @@ def main(foldername: str = "", overwrite: bool = True):
r = session.get(url + "datasources", headers=hed, verify=False)
for i in r.json():
print("Deleting datasource " + str(i["uid"]) + " - " + str(i["name"]))
r = session.delete(url + "datasources/uid/" + str(i["uid"]), headers=hed, verify=False)
r = session.delete(
url + "datasources/uid/" + str(i["uid"]), headers=hed, verify=False
)
print("Response: ", r.status_code)
listOfDatasources = []
for file in directoriesDatasources:
Expand All @@ -205,7 +207,9 @@ def main(foldername: str = "", overwrite: bool = True):
jsonObjectDatasource["url"] = "http://prometheus:" + env.str(
"MONITORING_PROMETHEUS_PORT"
)
r = session.post(url + "datasources", json=jsonObjectDatasource, headers=hed, verify=False)
r = session.post(
url + "datasources", json=jsonObjectDatasource, headers=hed, verify=False
)
objectToKeepTrack = {
"name": jsonObjectDatasource["name"],
"uid": jsonObjectDatasource["uid"],
Expand Down Expand Up @@ -265,10 +269,14 @@ def main(foldername: str = "", overwrite: bool = True):
# Get all datasources
r = session.get(url + "folders", headers=hed, verify=False)
for i in r.json():
r = session.delete(url + "folders/" + str(i["uid"]), headers=hed, verify=False)
r = session.delete(
url + "folders/" + str(i["uid"]), headers=hed, verify=False
)
print("Adding folders")
for directoryData in directoriesData:
r = session.post(url + "folders", json={"title": directoryData}, headers=hed, verify=False)
r = session.post(
url + "folders", json={"title": directoryData}, headers=hed, verify=False
)
if r.status_code != 200:
print("Received non-200 status code upon import: ", str(r.status_code))
print("JSON file failed uploading:")
Expand Down Expand Up @@ -312,7 +320,9 @@ def main(foldername: str = "", overwrite: bool = True):
dashboard["Dashboard"]["id"] = "null"
dashboard["overwrite"] = True
dashboard["folderId"] = folderID
r = session.post(url + "dashboards/db", json=dashboard, headers=hed, verify=False)
r = session.post(
url + "dashboards/db", json=dashboard, headers=hed, verify=False
)

if r.status_code != 200:
print(
Expand Down Expand Up @@ -407,8 +417,9 @@ def main(foldername: str = "", overwrite: bool = True):
mailAddressProvisioningJSON
if grafanaAlertingMailTarget
else slackWebhookProvisioningJSON
), verify=False,
headers=hed
),
verify=False,
headers=hed,
)
if r.status_code != 202:
print(
Expand Down Expand Up @@ -475,7 +486,10 @@ def main(foldername: str = "", overwrite: bool = True):
print("Add alerts " + jsonObject["name"])

r = session.post(
url + "ruler/grafana/api/v1/rules/ops", json=jsonObject, headers=hed, verify=False
url + "ruler/grafana/api/v1/rules/ops",
json=jsonObject,
headers=hed,
verify=False,
)
# with open(directory + "/debug.json", 'w') as outfile:
# json.dump(jsonObject, outfile, sort_keys=True, indent=2)
Expand Down
4 changes: 2 additions & 2 deletions services/pg-backup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ WHERE
DROP DATABASE simcoredb;
quit
```
- Finally, restore the DB :
- Finally, restore the DB :
```
psql simcoredb < /PG_osparc-master.speag.com_simcoredb.05-March-2023.dmp
```
```

0 comments on commit 7964814

Please sign in to comment.