Skip to content

Commit b7569a6

Browse files
(DOCS-15722): 4.4.18 initial changelog and changelog script fixes (#2117)
* (DOCS-15722): 4.4.18 initial changelog * fix bug with changelog output * refactoring * regenerate 4.4.18 changelog * fix typo
1 parent f90860e commit b7569a6

File tree

4 files changed

+179
-71
lines changed

4 files changed

+179
-71
lines changed

changelogs/generatechangelogs.py

Lines changed: 67 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import collections
22
import logging
33
import os
4-
import rstcloth.rstcloth as rstcloth
54
import yaml
65
from jira import JIRA
6+
from rstcloth import RstCloth
77

88
logger = logging.getLogger('generatechangelogs.py')
99

@@ -123,7 +123,7 @@ def get_issue_structure(config, issues, version):
123123
return headings
124124

125125

126-
def generate_changelog_rst(config, headings, fixVersion):
126+
def generate_changelog_rst(config, headings, fixVersion, outputFile):
127127
"""
128128
Generate the changelog rst from the groupings established in
129129
get_issue_structure()
@@ -135,92 +135,88 @@ def generate_changelog_rst(config, headings, fixVersion):
135135
for component in sub_headings:
136136
nested[component] = enclosing_level
137137

138-
# build the changelog content itself.
139-
r = rstcloth.RstCloth()
140-
level = 3
138+
with open (outputFile, 'w') as f:
139+
# build the changelog content itself.
140+
r = RstCloth(f)
141+
level = 3
141142

142-
r.ref_target("{0}-changelog".format(fixVersion))
143-
r.newline()
144-
r.heading(text="{0} Changelog".format(fixVersion), char='-')
145-
r.newline()
143+
r.ref_target("{0}-changelog".format(fixVersion))
144+
r.newline()
145+
r.heading(text="{0} Changelog".format(fixVersion), char='-')
146+
r.newline()
146147

147-
# process all of the issues by group.
148-
for heading, issues in headings.items():
149-
if heading in nested:
150-
# we deal with nested headings when we do their parent. skip here.
151-
continue
152-
else:
153-
if heading in config.get('nesting') and len(issues) == 0:
154-
# if a heading has subheadings, and all are empty, then we should skip it entirely.
155-
empty_sub_headings = 0
156-
for sub in config.get('nesting').get(heading):
157-
if len(headings[sub]) == 0:
158-
empty_sub_headings += 1
159-
if empty_sub_headings == len(config.get('nesting').get(heading)):
160-
continue
161-
elif len(issues) == 0:
162-
# skip empty headings.
148+
# process all of the issues by group.
149+
for heading, issues in headings.items():
150+
if heading in nested:
151+
# we deal with nested headings when we do their parent. skip here.
163152
continue
164-
165-
# format the heading.
166-
r.heading(text=heading, indent=0,
167-
char='~')
168-
r.newline()
169-
170-
if len(issues) == 1:
171-
r.content("{1} {0}".format(issues[0][1], r.role(
172-
"issue", issues[0][0])))
173153
else:
174-
for issue in issues:
175-
r.li("{1} {0}".format(issue[1], r.role(
176-
"issue", issue[0])))
177-
r.newline()
178-
179-
# repeat the above formatting with minor variations to do the nesting.
180-
if heading in config.get('nesting'):
181-
for sub in config.get('nesting').get(heading):
182-
if len(headings[sub]) == 0:
154+
if heading in config.get('nesting') and len(issues) == 0:
155+
# if a heading has subheadings, and all are empty, then we should skip it entirely.
156+
empty_sub_headings = 0
157+
for sub in config.get('nesting').get(heading):
158+
if len(headings[sub]) == 0:
159+
empty_sub_headings += 1
160+
if empty_sub_headings == len(config.get('nesting').get(heading)):
183161
continue
162+
elif len(issues) == 0:
163+
# skip empty headings.
164+
continue
184165

185-
r.heading(text=sub, indent=0,
186-
# char=giza.content.helper.character_levels[level+1])
187-
char='`')
188-
r.newline()
189-
190-
sub_issues = headings[sub]
191-
if len(sub_issues) == 0:
192-
r.content("{1} {0}".format(sub_issues[0][1].strip(), r.role(
193-
"issue", sub_issues[0][0])))
194-
else:
195-
for issue in sub_issues:
196-
r.li("{1} {0}".format(issue[1].strip(), r.role(
197-
"issue", issue[0])))
198-
r.newline()
199-
200-
return r
166+
# format the heading.
167+
r.heading(text=heading, indent=0,
168+
char='~')
169+
r.newline()
170+
171+
if len(issues) == 1:
172+
r.content("{1} {0}".format(issues[0][1], r.role(
173+
"issue", issues[0][0])))
174+
else:
175+
for issue in issues:
176+
r.li("{1} {0}".format(issue[1], r.role(
177+
"issue", issue[0])))
178+
r.newline()
179+
180+
# repeat the above formatting with minor variations to do the nesting.
181+
if heading in config.get('nesting'):
182+
for sub in config.get('nesting').get(heading):
183+
if len(headings[sub]) == 0:
184+
continue
185+
186+
r.heading(text=sub, indent=0,
187+
# char=giza.content.helper.character_levels[level+1])
188+
char='`')
189+
r.newline()
190+
191+
sub_issues = headings[sub]
192+
if len(sub_issues) == 0:
193+
r.content("{1} {0}".format(sub_issues[0][1].strip(), r.role(
194+
"issue", sub_issues[0][0])))
195+
else:
196+
for issue in sub_issues:
197+
r.li("{1} {0}".format(issue[1].strip(), r.role(
198+
"issue", issue[0])))
199+
r.newline()
201200

201+
print(
202+
"wrote changelog '{0}'. Commit this file independently.".format(outputFile))
202203

203-
def write_changelog_file(rst, fixVersion):
204204

205-
# Output the rst to source/includes/changelogs/releases
205+
def generate_output_filePath(fixVersion):
206206
sourceDir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
207207
fn = fixVersion + ".rst"
208208
outputDir = os.path.join(
209209
sourceDir, "source/includes/changelogs/releases", fn)
210210

211-
with open (outputDir, 'w') as f:
212-
f.write(str(rst))
213-
214-
logger.info(
215-
"wrote changelog '{0}'. Commit this file independently.".format(outputDir))
216-
217-
print(
218-
"wrote changelog '{0}'. Commit this file independently.".format(outputDir))
211+
return outputDir
219212

220213
def main():
221214
# Prompt user for the version to generate the changelog for:
222215
fixVersion = input("Enter changelog version: ")
223216

217+
# Generate the outputfile
218+
outputFile = generate_output_filePath(fixVersion)
219+
224220
# Get list of JIRA issues to include in changelog
225221
issues = get_jira_issues(fixVersion)
226222

@@ -231,10 +227,10 @@ def main():
231227
issue_headings = get_issue_structure(config, issues, fixVersion)
232228

233229
# Convert the issue headings into rst
234-
changelog_rst = generate_changelog_rst(config, issue_headings, fixVersion)
230+
changelog_rst = generate_changelog_rst(config, issue_headings, fixVersion, outputFile)
235231

236232
# Write the changelog to source/includes/changelogs/releases
237-
write_changelog_file(changelog_rst, fixVersion)
233+
# write_changelog_file(changelog_rst, fixVersion)
238234

239235
if __name__ == "__main__":
240236
main()
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
.. _4.4.18-changelog:
2+
3+
4.4.18 Changelog
4+
----------------
5+
6+
Query
7+
~~~~~
8+
9+
- :issue:`SERVER-50454` Avoiding sending the "keyValue" field to drivers
10+
on duplicate key error
11+
- :issue:`SERVER-66289` $out incorrectly throws BSONObj size error on
12+
v5.0.8
13+
14+
Operations
15+
~~~~~~~~~~
16+
17+
:issue:`SERVER-67793` log_progress_msg in init.d does not print message
18+
19+
Build and Packaging
20+
~~~~~~~~~~~~~~~~~~~
21+
22+
:issue:`SERVER-48203` Support --install-action for Ninja builds
23+
24+
Internals
25+
~~~~~~~~~
26+
27+
- :issue:`SERVER-56368` Prohibit running
28+
$backupCursor/$backupCursorExtend on an aggregation against a
29+
collection
30+
- :issue:`SERVER-58673` Enable featureFlagPerShardCursor
31+
- :issue:`SERVER-61185` Use prefix_search for unique index lookup
32+
- :issue:`SERVER-62400` Add $_passthroughToShard parameter to
33+
AggregateCommandRequest
34+
- :issue:`SERVER-62681` Create change streams per shard cursor
35+
passthrough suite
36+
- :issue:`SERVER-62738` Give mongos the ability to passthrough to a
37+
specific shard
38+
- :issue:`SERVER-63585` Fastcount gets out of sync when a delete
39+
rollbacks and another transaction deletes the same rows
40+
- :issue:`SERVER-63772` Post Batch Resume token not sent on initial
41+
batch from per shard cursor change stream
42+
- :issue:`SERVER-63773` Per Shard cursor post batch resume token not set
43+
in getMore responses
44+
- :issue:`SERVER-63774` Pass optional dbVersion to
45+
runPipelineOnSpecificShard
46+
- :issue:`SERVER-63781` $sortKey not filtered out in initial batch from
47+
post batch resume token
48+
- :issue:`SERVER-68115` Bug fix for "elemMatchRootLength > 0" invariant
49+
trigger
50+
- :issue:`SERVER-68126` Check for negative maxChunkSize input value in
51+
AutoSplitVector
52+
- :issue:`SERVER-68470` Amazon Linux 4.2/4.4 RPMs fail to install due to
53+
missing shadow-utils
54+
- :issue:`SERVER-69003` [4.4] backport pm-2419 Per Shard Cursors via
55+
mongos
56+
- :issue:`SERVER-69133` remove redundant setting of hardlink install
57+
action
58+
- :issue:`SERVER-69281` Force minimum ninja version
59+
- :issue:`SERVER-69348` Commands must declare empty auth checks to be
60+
universally callable
61+
- :issue:`SERVER-69389` Command checkAuthorization may throw
62+
ErrorCodes::NamespaceNotFound for existing collection while trying to
63+
resolve UUID to namespace when the node is shutting down.
64+
- :issue:`SERVER-69443` [4.4] Allow speculative majority reads in
65+
multi-doc txns when --enableMajorityReadConcern=false
66+
- :issue:`SERVER-69446` Increase electionTimeoutMillis in
67+
jstests/replsets/dbcheck_write_concern.js
68+
- :issue:`SERVER-69569` Python scripts failing in Evergreen tasks
69+
- :issue:`SERVER-69785` robustify change_streams_per_shard_cursor.js
70+
- :issue:`SERVER-69868` Return an error when starting a TransportLayer
71+
that is shutdown
72+
- :issue:`SERVER-69912` SConstruct is executable by mistake
73+
- :issue:`SERVER-70299` Remove JSON.send command usage
74+
- :issue:`SERVER-70348` Remove EAGAIN for queryable WT and retry
75+
internally
76+
- :issue:`SERVER-70398` Handle case when execution doesn't exist
77+
- :issue:`SERVER-70469` Use virtual env python in watchdog tests
78+
- :issue:`SERVER-70483` Update Resmoke to pass "evergreen_execution" up
79+
to logkeeper.
80+
- :issue:`SERVER-70484` Remove signal processing module from perf.yml
81+
and sys_perf.yml
82+
- :issue:`SERVER-70633` Make per shard cursors suite actually run tests
83+
in 5.0
84+
- :issue:`SERVER-70938` Remove --system-site-packages from virtual env
85+
setup
86+
- :issue:`WT-7912` Fix prefix search near optimisation to handle
87+
scenarios where the key range is split across pages.
88+

source/release-notes/4.4-changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
:depth: 1
1111
:class: singlecol
1212

13+
.. include:: /includes/changelogs/releases/4.4.18.rst
14+
1315
.. include:: /includes/changelogs/releases/4.4.17.rst
1416

1517
.. include:: /includes/changelogs/releases/4.4.16.rst

source/release-notes/4.4.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,28 @@ Release Notes for MongoDB 4.4
1313
Patch Releases
1414
--------------
1515

16+
.. _4.4.18-release-notes:
17+
18+
4.4.18 - Upcoming
19+
~~~~~~~~~~~~~~~~~
20+
21+
Issues fixed:
22+
23+
- :issue:`SERVER-66289` $out incorrectly throws BSONObj size error on
24+
v5.0.8
25+
- :issue:`SERVER-61185` Use prefix_search for unique index lookup
26+
- :issue:`SERVER-68115` Bug fix for "elemMatchRootLength > 0" invariant
27+
trigger
28+
- :issue:`SERVER-50454` Avoiding sending the "keyValue" field to drivers
29+
on duplicate key error
30+
- :issue:`SERVER-69443` [4.4] Allow speculative majority reads in
31+
multi-doc txns when --enableMajorityReadConcern=false
32+
33+
- `All JIRA issues closed in 4.4.18
34+
<https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.4.18%27>`_
35+
36+
- :ref:`4.4.18-changelog`
37+
1638
.. _4.4.17-release-notes:
1739

1840
4.4.17 - Sep 28, 2022

0 commit comments

Comments
 (0)