Skip to content

Commit b35b314

Browse files
authored
Pull request update/251127
db36ea3 OSN-1201. Temp disable it tiering discovery for bucket e43895f Show Create new org button with DEPLOYMENT_ADMIN role cbea902 OSN-1181. Added created_at field on DataSource details page b9a7627 OSN-1185. Added DEPLOYMENT_ADMIN action 0543006 OSN-1145. Fix flavors from other cloud type in ri_overprovision_hrs 27d38aa OSN-1157. Github workflow improvements e14271b OSN-1189. Update fetch policy in ManageInvitations and SetupOrganization components to 'no-cache'
2 parents 592e96c + db36ea3 commit b35b314

File tree

31 files changed

+655
-156
lines changed

31 files changed

+655
-156
lines changed

.github/CODEOWNERS

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# Frontend only for ngui
2-
ngui/ @hystax/ui
2+
ngui/ @hystax/ui
33

44
# Backend for other directories
5-
auth/ @hystax/backend
6-
bi_exporter/ @hystax/backend
7-
bumischeduler/ @hystax/backend
8-
bumiworker/ @hystax/backend
9-
diproxy/ @hystax/backend
10-
diworker/ @hystax/backend
11-
docker_images/ @hystax/backend
12-
gemini/ @hystax/backend
13-
herald/ @hystax/backend
14-
insider/ @hystax/backend
15-
jira_bus/ @hystax/backend
16-
jira_ui/ @hystax/backend
17-
katara/ @hystax/backend
18-
keeper/ @hystax/backend
19-
metroculus/ @hystax/backend
20-
optscale-deploy/ @hystax/backend
21-
optscale_client/ @hystax/backend
22-
rest_api/ @hystax/backend
23-
risp/ @hystax/backend
24-
slacker/ @hystax/backend
25-
tools/ @hystax/backend
26-
trapper/ @hystax/backend
5+
auth/ @hystax/backend
6+
bi_exporter/ @hystax/backend
7+
bumischeduler/ @hystax/backend
8+
bumiworker/ @hystax/backend
9+
diproxy/ @hystax/backend
10+
diworker/ @hystax/backend
11+
docker_images/ @hystax/backend
12+
gemini/ @hystax/backend
13+
herald/ @hystax/backend
14+
insider/ @hystax/backend
15+
jira_bus/ @hystax/backend
16+
jira_ui/ @hystax/backend
17+
katara/ @hystax/backend
18+
keeper/ @hystax/backend
19+
metroculus/ @hystax/backend
20+
optscale_client/ @hystax/backend
21+
optscale-deploy/ @hystax/backend
22+
rest_api/ @hystax/backend
23+
risp/ @hystax/backend
24+
slacker/ @hystax/backend
25+
tools/ @hystax/backend
26+
trapper/ @hystax/backend
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Auto-assign PR author
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
auto-assign:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
12+
13+
steps:
14+
- name: Assign PR author
15+
uses: actions/github-script@v8
16+
with:
17+
script: |
18+
const reporter = context.actor
19+
await github.rest.issues.addAssignees({
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
issue_number: context.payload.pull_request.number,
23+
assignees: [reporter]
24+
})
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Manage PR "bug" label
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
permissions:
8+
pull-requests: write
9+
issues: write
10+
11+
jobs:
12+
manage-bug-label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check if branch contains "bug"
16+
id: check-branch
17+
uses: actions/github-script@v8
18+
with:
19+
script: |
20+
const branchName = context.payload.pull_request.head.ref;
21+
const containsBug = branchName.toLowerCase().startsWith('bug');
22+
core.setOutput('contains_bug', containsBug.toString());
23+
24+
- name: Add "bug" label if branch contains "bug"
25+
if: steps.check-branch.outputs.contains_bug == 'true'
26+
uses: actions-ecosystem/action-add-labels@v1
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
labels: bug
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Manage PR "ui" label
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
permissions:
8+
pull-requests: write
9+
issues: write
10+
11+
jobs:
12+
manage-ui-label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Filter changes
16+
uses: dorny/paths-filter@v3
17+
id: filter
18+
with:
19+
filters: |
20+
ngui:
21+
- 'ngui/**'
22+
23+
- name: Add "ui" label if ngui files changed
24+
if: steps.filter.outputs.ngui == 'true'
25+
uses: actions-ecosystem/action-add-labels@v1
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
labels: ui
29+
30+
- name: Remove "ui" label if no ngui files changed
31+
if: steps.filter.outputs.ngui != 'true'
32+
uses: actions-ecosystem/action-remove-labels@v1
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
labels: ui
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# pylint: disable=C0103
2+
"""add deployment admin action
3+
4+
Revision ID: 998f27cb8c46
5+
Revises: 76fd6db54f65
6+
Create Date: 2024-11-18 09:57:42.103381
7+
8+
"""
9+
from alembic import op
10+
import sqlalchemy as sa
11+
from sqlalchemy import delete, func, insert, Integer, String
12+
from sqlalchemy.orm import Session
13+
from sqlalchemy.sql import table, column
14+
from datetime import datetime, timezone
15+
16+
# revision identifiers, used by Alembic.
17+
revision = '998f27cb8c46'
18+
down_revision = '76fd6db54f65'
19+
branch_labels = None
20+
depends_on = None
21+
22+
ACTION_GROUP = "GLOBAL_MANAGEMENT"
23+
ACTION_NAME = "DEPLOYMENT_ADMIN"
24+
TYPE_NAME = "root"
25+
26+
27+
def upgrade():
28+
action_table = table(
29+
'action',
30+
column('name', String(length=64)),
31+
column('order', Integer()),
32+
column('action_group_id', Integer()),
33+
column('type_id', Integer()),
34+
column('created_at', Integer()),
35+
column('deleted_at', Integer()),
36+
)
37+
action_group_table = table(
38+
'action_group',
39+
column('id', Integer()),
40+
column('name', String(length=50)),
41+
column('order', Integer()),
42+
)
43+
type_table = table(
44+
'type',
45+
column('id', Integer()),
46+
column('name', sa.String(length=24)),
47+
)
48+
bind = op.get_bind()
49+
session = Session(bind=bind)
50+
try:
51+
query = session.query(
52+
action_group_table.c.id,
53+
action_group_table.c.order,
54+
func.count()
55+
).join(
56+
action_table,
57+
action_group_table.c.id == action_table.c.action_group_id
58+
).filter(
59+
action_group_table.c.name == "GLOBAL_MANAGEMENT"
60+
).group_by(
61+
action_group_table.c.id,
62+
action_group_table.c.order
63+
)
64+
data = session.execute(query).first()
65+
group_id, order, count = data
66+
type_id = session.query(type_table.c.id).filter(
67+
type_table.c.name == TYPE_NAME).scalar()
68+
created_at = int(datetime.now(tz=timezone.utc).timestamp())
69+
session.execute(insert(action_table).values(
70+
action_group_id=group_id, type_id=type_id, name=ACTION_NAME,
71+
order=order + (count + 1) * 10, created_at=created_at,
72+
deleted_at=0
73+
))
74+
session.commit()
75+
except Exception:
76+
session.rollback()
77+
raise
78+
finally:
79+
session.close()
80+
81+
82+
def downgrade():
83+
action_table = table(
84+
'action',
85+
column('name', String(length=64))
86+
)
87+
bind = op.get_bind()
88+
session = Session(bind=bind)
89+
try:
90+
session.execute(
91+
delete(action_table).where(action_table.c.name == ACTION_NAME))
92+
session.commit()
93+
finally:
94+
session.close()

0 commit comments

Comments
 (0)