mirror of
https://github.com/penpot/penpot.git
synced 2026-11-16 15:11:17 +00:00
Merge remote-tracking branch 'origin/staging-2.19.x' into staging
This commit is contained in:
commit
65b882d044
@ -8,7 +8,7 @@
|
||||
- `boom <MILESTONE> [--changes CHANGES.md --write]` — generate `### :boom: Breaking changes & Deprecations` from the closed, non-excluded milestone issues labelled `breaking change`, sorted by issue number. Each issue becomes a `#### <issue title>` block: content = body of the issue's last `## Breaking change note` comment (whole markdown, headings demoted to `#####` outside code fences; fallback = heading plus refs with a stderr warning), refs = issue link plus merged closing PRs on their own line, with `(by @author)` for `community contribution`. `--write` replaces only that subsection of the version (inserts it after the version header when missing, keeps the heading when there are no entries; idempotent). Print-only by default. Uses `gh.py comments`.
|
||||
- `security <MILESTONE> [--changes CHANGES.md --write]` — generate `### :lock: Security fixes` from the advisories whose `patched_versions` include the version (via `gh.py advisories --patched-version`), sorted by GHSA id. Entry: `- Fix <description> (<advisory URL>) (PR: [#N](...))`; description = `Fix` + advisory summary, first word decapitalized unless it starts with an acronym; PRs = merged milestone PRs labelled `pr pt` whose body contains the GHSA id, comma-separated, and no PR is legal. Warns on stderr when a `pr pt` PR references an advisory with no matching `patched_versions`. `--write` replaces only that subsection, placed after `:rocket:` (or `:boom:`, or the version header when neither exists); empty entries remove the subsection; idempotent. Print-only by default.
|
||||
- `cross-ref <MILESTONE> [--changes CHANGES.md]` — fetch milestone PRs with `--state all` once, report merged PRs missing from the version section plus CLOSED (unmerged) warnings. PR links inside `:lock:` entries count as referenced; advisory URLs never appear here by design.
|
||||
- `dev-only-bugs <MILESTONE> [--apply]` — list closed milestone bugs that never reached production, without `no changelog` (bugs carrying `release blocker` are analyzed too). Sure: parent issue is a `Feature`/`Enhancement` of the same milestone; `--apply` adds `no changelog` to these only. Candidates (never labelled automatically): parent is an epic of the milestone, `regression` label, or the "Affected versions" / "Environment" body field names only hourly, develop, staging, PRE or this milestone (`only_unreleased_envs`; any production hint or other version keeps the bug in). Reads `body` and `parent` from one batched `gh.py issue` lookup.
|
||||
- `dev-only-bugs <MILESTONE> [--apply]` — list closed milestone bugs that never reached production, without `no changelog` (bugs carrying `release blocker` are analyzed too). Sure: parent issue is a `Feature`/`Enhancement` of the same milestone; `--apply` adds `no changelog` to these only. Candidates (never labelled automatically): parent is an epic of the milestone, `regression` label, or the "Affected versions" / "Environment" body field names only hourly, develop, staging, PRE or the milestone version itself (`only_unreleased_envs`; any production hint or other version keeps the bug in — versions compare as full semver with missing patch = 0, so for milestone 2.19.2 the released 2.19.0 keeps the bug in). Reads `body` and `parent` from one batched `gh.py issue` lookup.
|
||||
- `report <MILESTONE> [--changes CHANGES.md --output CHANGES-ISSUES.md]` — overwrite the anomaly report: A/B milestone mismatches, E `:boom:` entry without the label, F `:rocket:` sync, G `:boom:` sync, plus the C/D `:rocket:` gaps and the `dev-only-bugs` lists (warnings). `:boom:`/`:rocket:` rule violations are fixed by regenerating or relabelling, not by editing entries in place.
|
||||
|
||||
## Conventions
|
||||
|
||||
@ -162,7 +162,7 @@ Generated from the advisories that declare the version in `patched_versions`; ne
|
||||
2. **Fetch the milestone issues**: `python3 scripts/gh.py issues "<VERSION>" --exclude "no changelog"` (closed by default; add `--state all` only to inspect open issues). `gh.py` already drops `Task` and `Rejected`; pass `--include-tasks` / `--include-rejected` only to inspect them. To find what is missing from an existing section, add `--compare CHANGES.md`.
|
||||
3. **Keep out bugs that never reached production**: `python3 scripts/changelog.py dev-only-bugs "<VERSION>"` lists them; add `--apply` to label the sure ones `no changelog` on GitHub, then re-fetch step 2. The label puts the decision on the issue, so it survives a regeneration. Bugs carrying `release blocker` are analyzed like any other bug.
|
||||
- **Sure**: a bug whose parent issue is a `Feature` or `Enhancement` of the same milestone. `--apply` labels these.
|
||||
- **Candidates**: a bug whose parent is an epic of the same milestone, that carries the `regression` label, or whose "Affected versions" / "Environment" field names only hourly, develop, staging, PRE or a version of this milestone. `regression` also marks regressions users hit in production, and the field says where the bug was seen, not since when it exists, so never label these yourself: show them to the user, who labels the ones they confirm. The anomaly report lists them too (section 10).
|
||||
- **Candidates**: a bug whose parent is an epic of the same milestone, that carries the `regression` label, or whose "Affected versions" / "Environment" field names only hourly, develop, staging, PRE or the milestone version itself. `regression` also marks regressions users hit in production, and the field says where the bug was seen, not since when it exists, so never label these yourself: show them to the user, who labels the ones they confirm. The anomaly report lists them too (section 10).
|
||||
- **Closed non-bug issues carrying `release blocker`** have no automatic check: `python3 scripts/gh.py issues "<VERSION>" --label "release blocker" --exclude "no changelog"` lists them (closed, non-Task). Show them to the user: the internal ones get the `no changelog` label, the rest keep their entry.
|
||||
4. **Fetch PR details when needed**: `python3 scripts/gh.py prs <numbers...>` (also `--milestone`). Use it for the PR author, labels and merge state.
|
||||
5. **Categorize** by Issue Type and the two labels (section 2), and **build the descriptions** (section 4).
|
||||
|
||||
11
CHANGES.md
11
CHANGES.md
@ -111,6 +111,17 @@ If you upgrade blindly: on fresh databases and small instances the startup migra
|
||||
- Fix workspace memory growing on every page switch with the WebGL renderer [#13028](https://github.com/penpot/penpot/issues/13028) (PR: [#12877](https://github.com/penpot/penpot/pull/12877))
|
||||
- Fix workspace showing React error #310 when the team container renders without a team id (by @filipsajdak) [#12728](https://github.com/penpot/penpot/issues/12728) (PR: [#12920](https://github.com/penpot/penpot/pull/12920))
|
||||
|
||||
## 2.19.2
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Fix referential integrity error when copying component variants with nested components across libraries and teams [#10704](https://github.com/penpot/penpot/issues/10704) (PR: [#12928](https://github.com/penpot/penpot/pull/12928))
|
||||
- Fix migration 0033 inserting nil shape entries for dangling child references that blocked file opening [#12936](https://github.com/penpot/penpot/issues/12936) (PR: [#12979](https://github.com/penpot/penpot/pull/12979))
|
||||
- Fix switching a variant and adding a component instance taking over 10 seconds in files with many token-styled shapes [#13019](https://github.com/penpot/penpot/issues/13019) (PR: [#13021](https://github.com/penpot/penpot/pull/13021))
|
||||
- Fix autosave failing after uploading an SVG as a component in the assets panel, and on other mains named unlike their component [#12773](https://github.com/penpot/penpot/issues/12773) (PR: [#12794](https://github.com/penpot/penpot/pull/12794))
|
||||
- Fix `enable-oidc-registration` not working when password login is disabled [#12964](https://github.com/penpot/penpot/issues/12964) (PR: [#12974](https://github.com/penpot/penpot/pull/12974))
|
||||
- Fix self-hosted backend opening 60 database connections at startup and keeping them open while idle (by @UsamaSadiq) [#12622](https://github.com/penpot/penpot/issues/12622) (PR: [#13052](https://github.com/penpot/penpot/pull/13052))
|
||||
|
||||
## 2.19.1
|
||||
|
||||
### :lock: Security fixes
|
||||
|
||||
@ -634,7 +634,7 @@ PROD_ENV_RE = re.compile(
|
||||
r"\b(?:production|pro|main|saas|design\.penpot\.app|self[- ]?hosted?)\b",
|
||||
re.IGNORECASE,
|
||||
)
|
||||
VERSION_RE = re.compile(r"\b(\d+)\.(\d+)(?:\.\d+)?")
|
||||
VERSION_RE = re.compile(r"\b(\d+)\.(\d+)(?:\.(\d+))?")
|
||||
|
||||
|
||||
def version_field(body: str | None) -> str:
|
||||
@ -643,12 +643,21 @@ def version_field(body: str | None) -> str:
|
||||
return " ".join(match.group(1).split()) if match else ""
|
||||
|
||||
|
||||
def full_version(match: tuple[str, ...]) -> tuple[int, int, int]:
|
||||
"""Normalize a version regex match to (major, minor, patch)."""
|
||||
major, minor, patch = match
|
||||
return (int(major), int(minor), int(patch) if patch else 0)
|
||||
|
||||
|
||||
def only_unreleased_envs(text: str, milestone: str) -> bool:
|
||||
"""True when the version text names unreleased environments only:
|
||||
hourly, develop, staging, PRE or a version of this milestone. Any
|
||||
hourly, develop, staging, PRE or exactly this milestone. Any
|
||||
production hint or other version number keeps the bug in the changelog."""
|
||||
current = tuple(milestone.split(".")[:2])
|
||||
versions = [m for m in VERSION_RE.findall(text)]
|
||||
current_match = VERSION_RE.search(milestone)
|
||||
if current_match is None:
|
||||
raise ValueError(f"milestone {milestone!r} is not a semver version")
|
||||
current = full_version(current_match.groups())
|
||||
versions = [full_version(m) for m in VERSION_RE.findall(text)]
|
||||
dev = bool(DEV_ENV_RE.search(text)) or current in versions
|
||||
prod = bool(PROD_ENV_RE.search(text)) or any(v != current for v in versions)
|
||||
return dev and not prod
|
||||
|
||||
@ -697,6 +697,18 @@ class OnlyUnreleasedEnvsTests(unittest.TestCase):
|
||||
with self.subTest(text=text):
|
||||
self.assertFalse(self.check(text))
|
||||
|
||||
def test_released_patch_of_the_same_minor_is_production(self):
|
||||
# 2.19.0/2.19.1 are released versions, not this milestone (2.19.2):
|
||||
# any version other than the milestone itself keeps the bug in.
|
||||
for text in ["2.19.0 and later", "2.19.1", "2.19.0-RC1", "since 2.16"]:
|
||||
with self.subTest(text=text):
|
||||
self.assertFalse(ch.only_unreleased_envs(text, "2.19.2"))
|
||||
|
||||
def test_milestone_version_itself_is_unreleased(self):
|
||||
for text in ["2.19.2", "2.19.2-RC1 (develop)"]:
|
||||
with self.subTest(text=text):
|
||||
self.assertTrue(ch.only_unreleased_envs(text, "2.19.2"))
|
||||
|
||||
|
||||
class FindDevOnlyBugsTests(unittest.TestCase):
|
||||
def test_splits_auto_and_suggested(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user