Skip to content

Commit 54f640b

Browse files
authored
Merge fdf45e9 into 5854f4a
2 parents 5854f4a + fdf45e9 commit 54f640b

File tree

3 files changed

+59
-29
lines changed

3 files changed

+59
-29
lines changed

Diff for: .github/actions/update_changelog/update_changelog.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def fetch_user_details(username):
169169
response.raise_for_status()
170170
return response.json()
171171

172-
if __name__ == "__main__":
172+
def main():
173173
if len(sys.argv) != 5:
174174
print("Usage: update_changelog.py <pr_data_file> <changelog_path> <base_branch> <suffix>")
175175
sys.exit(1)
@@ -187,6 +187,10 @@ def fetch_user_details(username):
187187
sys.exit(1)
188188

189189
pr_data = []
190+
if not pr_ids:
191+
print("::notice::No PR IDs found in the provided file.")
192+
return
193+
190194
for pr in pr_ids:
191195
try:
192196
pr_details = fetch_pr_details(pr["id"])
@@ -212,13 +216,18 @@ def fetch_user_details(username):
212216
while branch_exists(branch_name):
213217
branch_name = f"{base_branch_name}-{index}"
214218
index += 1
219+
run_command(f"git checkout -b {base_branch}")
215220
run_command(f"git checkout -b {branch_name}")
216221
run_command(f"git add {changelog_path}")
217222
run_command(f"git commit -m \"Update CHANGELOG.md for {suffix}\"")
218223
run_command(f"git push origin {branch_name}")
219224

220-
pr_title = f"Update CHANGELOG.md for {suffix}"
225+
pr_title = f"Update CHANGELOG.md for {base_branch}:{suffix}"
221226
pr_body = f"This PR updates the CHANGELOG.md file for {suffix}."
222227
pr_create_command = f"gh pr create --title \"{pr_title}\" --body \"{pr_body}\" --base {base_branch} --head {branch_name}"
223228
pr_url = run_command(pr_create_command)
224229
# run_command(f"gh pr edit {pr_url} --add-assignee galnat") # TODO: Make assignee customizable
230+
231+
232+
if __name__ == "__main__":
233+
main()

Diff for: .github/workflows/weekly_update_changelog.yml

+42-21
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,49 @@ name: Weekly Changelog Update
33
on:
44
schedule:
55
- cron: '0 0 * * 0' # Every Sunday at 00:00
6-
branches:
7-
- main
8-
- stable-*
96
workflow_dispatch:
107
env:
118
GH_TOKEN: ${{ secrets.YDBOT_TOKEN }}
129

1310
jobs:
11+
gather-branches:
12+
runs-on: ubuntu-latest
13+
14+
outputs:
15+
branches: ${{ steps.branch-list.outputs.branches }}
16+
17+
steps:
18+
- name: Check out repository
19+
uses: actions/checkout@v4
20+
21+
- name: List 'main' and 'stable-*' branches
22+
id: branch-list
23+
run: |
24+
git fetch --all
25+
BRANCHES=$(git branch -r | grep -E "origin/(main|stable-25(-[0-9]+)*)$" | grep -v HEAD | sed "s/origin\///" | xargs | tr -d '\n' | jq -R -s -c "split(\" \")")
26+
echo "::notice:: BRANCHES $BRANCHES"
27+
if [ -z "$BRANCHES" ]; then
28+
BRANCHES="[]"
29+
fi
30+
echo "$BRANCHES" > branches.json
31+
echo "branches=$BRANCHES" >> "$GITHUB_OUTPUT"
32+
1433
gather-prs:
1534
runs-on: ubuntu-latest
35+
needs: gather-branches
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
branch: ${{ fromJson(needs.gather-branches.outputs.branches) }}
1640
outputs:
1741
prs: ${{ steps.pr-list.outputs.prs }}
42+
base_branch: ${{ steps.branch-name.outputs.base_branch }}
1843
steps:
1944
- name: Check out repository
2045
uses: actions/checkout@v4
21-
46+
with:
47+
ref: ${{ github.ref }}
48+
2249
- name: Set up date range
2350
id: date-setup
2451
run: |
@@ -28,32 +55,26 @@ jobs:
2855
- name: Get merged PRs
2956
id: pr-list
3057
run: |
31-
echo "::notice:: branch = ${GITHUB_REF_NAME}, date = $LAST_WEEK_DATE"
32-
PRS=$(gh pr list --state merged --json number,title,baseRefName,mergedAt --jq ".[] | select(.baseRefName == \"${GITHUB_REF_NAME}\" and .mergedAt >= \"$LAST_WEEK_DATE\") | {id: .number}" | jq -c -s ".")
58+
REF_NAME=${{ matrix.branch }}
59+
echo "::notice:: branch = $REF_NAME, date = $LAST_WEEK_DATE"
60+
PRS=$(gh pr list --state merged --json number,title,baseRefName,mergedAt --jq ".[] | select(.baseRefName == \"$REF_NAME\" and .mergedAt >= \"$LAST_WEEK_DATE\") | {id: .number}" | jq -c -s ".")
3361
3462
if [ -z "$PRS" ]; then
3563
PRS="[]"
3664
fi
37-
echo "$PRS" > prs.json
65+
echo "$PRS" > prs-${{ matrix.branch }}.json
66+
echo "PRS=$PRS" >> $GITHUB_ENV
3867
echo "prs=$PRS" >> "$GITHUB_OUTPUT"
3968
4069
- name: Debug PR list output
4170
run: |
42-
cat prs.json
71+
cat prs-${{ matrix.branch }}.json
4372
4473
- name: Upload PRs JSON
4574
uses: actions/upload-artifact@v4
4675
with:
47-
name: prs-json
48-
path: prs.json
49-
50-
update-changelog:
51-
needs: gather-prs
52-
runs-on: ubuntu-latest
53-
54-
steps:
55-
- name: Check out the repository
56-
uses: actions/checkout@v4
76+
name: prs-json-${{ matrix.branch }}
77+
path: prs-${{ matrix.branch }}.json
5778

5879
- name: Get current date
5980
id: get-date
@@ -65,7 +86,7 @@ jobs:
6586
env:
6687
GH_TOKEN: ${{ secrets.YDBOT_TOKEN }}
6788
with:
68-
pr_data: "${{ needs.gather-prs.outputs.prs }}"
69-
changelog_path: "./CHANGELOG.md" # RODO: Use the correct path to your CHANGELOG.md file
70-
base_branch: "${{ github.ref_name }}"
89+
pr_data: ${{ steps.pr-list.outputs.prs }}
90+
changelog_path: "./CHANGELOG.md"
91+
base_branch: "${{ matrix.branch }}"
7192
suffix: "${{ env.suffix }}"

Diff for: CHANGELOG.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
## Unreleased
22

33
### Functionality
4-
54
* 15186:Increased [the query text limit size](../dev/system-views#query-metrics) in system views from 4 KB to 10 KB. [#15186](https://github.com/ydb-platform/ydb/pull/15186) ([spuchin](https://github.com/spuchin))
6-
* 15693:Added a health check configuration that administrators can customize: the number of node restarts, tablets, the time difference between database dynodes,
7-
and timeout (by default, the maximum response time from healthcheck). Documentation is under construction. [#15693](https://github.com/ydb-platform/ydb/pull/15693) ([Andrei Rykov](https://github.com/StekPerepolnen))
5+
* None:15693:Added a health check configuration that administrators can customize: the number of node restarts, tablets, the time difference between database dynodes,
86

97
### Bug fixes
10-
118
* 15721:Fixed a bug in YDB UUID column handling in ReadTable SDK method. [#15721](https://github.com/ydb-platform/ydb/pull/15721) ([Ivan Nikolaev](https://github.com/lex007in))
129
* 16061:Fixed a bug in handling OLAP scan queries with predicates. [#16061](https://github.com/ydb-platform/ydb/pull/16061) ([Semyon](https://github.com/swalrus1))
1310
* 16060:Fixed an [error](https://github.com/ydb-platform/ydb/issues/15551) that caused the **RETURNING** clause work incorrectly with INSERT/UPSERT operations. [#16060](https://github.com/ydb-platform/ydb/pull/16060) ([Vitalii Gridnev](https://github.com/gridnevvvit))
14-
* 16021:Fixed a rare error that led to a VERIFY error when replicating data. #10650 [#16021](https://github.com/ydb-platform/ydb/pull/16021) ([Alexander Rutkovsky](https://github.com/alexvru))
11+
* 10650:21:Fixed a rare error that led to a VERIFY error when replicating data. #10650 [#16021](https://github.com/ydb-platform/ydb/pull/16021) ([Alexander Rutkovsky](https://github.com/alexvru))
1512
* 16016:Fixed rare node failures during read session balancing. https://github.com/ydb-platform/ydb/issues/16017 [#16016](https://github.com/ydb-platform/ydb/pull/16016) ([Nikolay Shestakov](https://github.com/nshestakov))
16-
* 16423:Changed behavior — `SHOW CREATE TABLE` now fails on views instead of producing wrong output. [#16423](https://github.com/ydb-platform/ydb/pull/16423) ([Daniil Demin](https://github.com/jepett0))
13+
* 16423:Changed behavior — `SHOW CREATE TABLE` now fails on views instead of producing wrong output. [#16423](https://github.com/ydb-platform/ydb/pull/16423) ([Daniil Demin](https://github.com/jepett0))
14+
* 16958:Fixed unauthorized error in `ydb admin database restore` when multiple database admins are in dump. https://github.com/ydb-platform/ydb/issues/16833 [#16958](https://github.com/ydb-platform/ydb/pull/16958) ([Ilia Shakhov](https://github.com/pixcc))
15+
* 16943:Fixed scheme error in `ydb admin cluster dump` when specifying a domain database. https://github.com/ydb-platform/ydb/issues/16262 [#16943](https://github.com/ydb-platform/ydb/pull/16943) ([Ilia Shakhov](https://github.com/pixcc))
16+

0 commit comments

Comments
 (0)