Skip to content

Commit

Permalink
Update changelog for 0.43.0 release. (#2702)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Robinson <[email protected]>
  • Loading branch information
merobi-hub committed Dec 15, 2023
1 parent 4194d28 commit beb00b8
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 71 deletions.
37 changes: 30 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
# Changelog

## [Unreleased](https://github.com/MarquezProject/marquez/compare/0.42.0...HEAD)
## [Unreleased](https://github.com/MarquezProject/marquez/compare/0.43.0...HEAD)

## [0.43.0](https://github.com/MarquezProject/marquez/compare/0.42.0...0.43.0) - 2023-12-15
### Added
* API: support `DatasetEvent` [`#2641`](https://github.com/MarquezProject/marquez/pull/2641) [@pawel-big-lebowski]( https://github.com/pawel-big-lebowski)
*Save into Marquez model datasets sent via `DatasetEvent` event type
* API: support `JobEvent` [`#2661`](https://github.com/MarquezProject/marquez/pull/2661) [@pawel-big-lebowski]( https://github.com/pawel-big-lebowski)
*Save into Marquez model jobs and datasets sent via `JobEvent` event type.
* API: support streaming jobs [`#2682`](https://github.com/MarquezProject/marquez/pull/2682) [@pawel-big-lebowski]( https://github.com/pawel-big-lebowski)
*Creates job version and reference rows at the beginning of the job instead of on complete. Updates job version within the run if anything changes.
* API: refactor the `RunDao` SQL query [`#2685`](https://github.com/MarquezProject/marquez/pull/2685) [@sophiely](https://github.com/sophiely)
*Improves the performance of the SQL query used for listing all runs.*
* API: refactor dataset version query [`#2683`](https://github.com/MarquezProject/marquez/pull/2683) [@sophiely](https://github.com/sophiely)
*Improves the performance of the SQL query used for the dataset version.*
* API: add support for a `DatasetEvent` [`#2641`](https://github.com/MarquezProject/marquez/pull/2641) [`#2654`](https://github.com/MarquezProject/marquez/pull/2654) [@pawel-big-lebowski]( https://github.com/pawel-big-lebowski)
*Adds a feature for saving into the Marquez model datasets sent via the `DatasetEvent` event type. Includes optimization of the lineage query.*
* API: add support for a `JobEvent` [`#2661`](https://github.com/MarquezProject/marquez/pull/2661) [@pawel-big-lebowski]( https://github.com/pawel-big-lebowski)
*Adds a feature for saving into the Marquez model jobs and datasets sent via the `JobEvent` event type.*
* API: add support for streaming jobs [`#2682`](https://github.com/MarquezProject/marquez/pull/2682) [@pawel-big-lebowski]( https://github.com/pawel-big-lebowski)
*Creates job version and reference rows at the beginning of the job instead of on complete. Updates the job version within the run if anything changes.*
* API/spec: implement upstream run-level lineage [`#2658`](https://github.com/MarquezProject/marquez/pull/2658) [@julienledem](https://github.com/julienledem)
*Returns the version of each job and dataset a run is depending on.*
* API: add `DELETE` endpoint for dataset tags [`#2698`](https://github.com/MarquezProject/marquez/pull/2698) [@davidsharp7](https://github.com/davidsharp7)
*Creates a new endpoint for removing the linkage between a dataset and a tag in `datasets_tag_mapping` to supply a way to delete a tag from a dataset via the API.
* Web: add a dataset drawer [`#2672`](https://github.com/MarquezProject/marquez/pull/2672) [@davidsharp7](https://github.com/davidsharp7)
*Adds a drawer to the dataset column view in the GUI.*

### Fixed:
* Client/Java: change url path encoding to match jersey decoding [`#2693`](https://github.com/MarquezProject/marquez/pull/2693) [@davidjgoss](https://github.com/davidjgoss)
*Swaps out the implementation of `MarquezPathV1::encode` to use the `UrlEscapers` path segment escaper, which does proper URI encoding.*
* Web: fix pagination in the Jobs route [`#2655`](https://github.com/MarquezProject/marquez/pull/2655) [@merobi-hub](https://github.com/merobi-hub)
*Hides job pagination in the case of no jobs.*
* Web: fix empty search experience [`#2679`](https://github.com/MarquezProject/marquez/pull/2679) [@phixMe](https://github.com/phixMe)
*Use of the previous search value was resulting in a bad request for the first character of a search.*

### Removed:
* Client/Java: remove maven-archiver dependency from the Java client [`#2695`](https://github.com/MarquezProject/marquez/pull/2695) [@davidjgoss](https://github.com/davidjgoss)
*Removes a dependency from `build.gradle` that was bringing some transitive vulnerabilities.*

## [0.42.0](https://github.com/MarquezProject/marquez/compare/0.41.0...0.42.0) - 2023-10-17
### Added
Expand Down
140 changes: 76 additions & 64 deletions dev/get_changes.py
Original file line number Diff line number Diff line change
@@ -1,135 +1,147 @@
#!/bin/bash
#!/usr/bin/env python3
#
# Copyright 2018-2023 contributors to the Marquez project
# SPDX-License-Identifier: Apache-2.0

from github import Github
import rich_click as click
from datetime import date
from typing import TYPE_CHECKING

import rich_click as click
from github import Github

if TYPE_CHECKING:
from github.PullRequest import PullRequest

class GetChanges:

class GetChanges:
def __init__(self, github_token: str, previous: str, current: str, path: str):
self.github_token = github_token
self.previous = previous
self.current = current
self.path = path
self.pulls: list[PullRequest] = []
self.rel_title_str: str = ''
self.rel_title_str: str = ""
self.text: list[str] = []
self.new_contributors: dict[str:str] = {}

def get_pulls(self):
print('Working on it...')
print("Working on it...")
g = Github(self.github_token)
repo = g.get_repo("MarquezProject/marquez")
prev_date = repo.get_release(self.previous).created_at
commits = repo.get_commits(since=prev_date)
self.pulls = [pull for commit in commits for pull in commit.get_pulls()]

def write_title(self):
self.rel_title_str = f'## [{self.current}](https://github.com/MarquezProject/marquez/compare/{self.previous}...{self.current}) - {date.today()}'
self.rel_title_str = f"## [{self.current}](https://github.com/MarquezProject/marquez/compare/{self.previous}...{self.current}) - {date.today()}" # noqa: E501

def describe_changes(self):
for pull in self.pulls:

""" Assembles change description with PR and user URLs """
entry = []
if pull.user.login != 'dependabot[bot]':
if pull.user.login != "dependabot[bot]":
labels = []
for label in pull.labels:
if label.name != 'documentation':
if label.name != "documentation":
labels.append(label.name)
change_str = f'* **{labels[0]}: {pull.title}** [`#{pull.number}`]({pull.html_url}) [@{pull.user.login}]({pull.user.html_url}) '

try:
change_str = f"* **{labels[0]}: {pull.title}** [`#{pull.number}`]({pull.html_url}) [@{pull.user.login}]({pull.user.html_url}) " # noqa: E501
except Exception:
continue
""" Extracts one-line description if present """
beg = pull.body.find('One-line summary:') + 18
if beg == 17:
change_descrip_str = ' **'
else:
test = pull.body.find('### Checklist')
if test == -1:
end = beg + 75
try:
beg = pull.body.find("One-line summary:") + 18
if beg == 17: # noqa: PLR2004
change_descrip_str = " **"
else:
end = test - 1
descrip = pull.body[beg:end].split()
descrip_str = ' '.join(descrip)
change_descrip_str = f' *{descrip_str}*'

entry.append(change_str + '\n')
entry.append(change_descrip_str + '\n')
test = pull.body.find("### Checklist")
end = beg + 75 if test == -1 else test - 1
descrip = pull.body[beg:end].split()
descrip_str = " ".join(descrip)
change_descrip_str = f" *{descrip_str}*"
except Exception:
continue

""" Checks for new contributor """
self.check_new_contributor(pull)

entry.append(change_str + "\n")
entry.append(change_descrip_str + "\n")
self.text.append(entry)

def get_new_contributors(self):
for pull in self.pulls:
comments = pull.get_issue_comments()
for comment in comments:
if 'Thanks for opening your' in comment.body:
self.new_contributors[pull.user.login] = pull.user.url
def check_new_contributor(self, pull):
comments = pull.get_issue_comments()
for comment in comments:
if "Thanks for opening your" in comment.body:
self.new_contributors[pull.user.login] = pull.user.url

def print_new_contributors(self):
if self.new_contributors:
print('New contributors:')
print("New contributors:")
for k, v in self.new_contributors.items():
print(f'@{k}: {v}')
print(f"@{k}: {v}")
else:
print('Note: no new contributors were found.')
print("Note: no new contributors were identified.")

def update_changelog(self):
f = open('changes.txt', 'w+')
f = open('changes.txt', 'a')
f.write(self.rel_title_str + '\n')
for entry in self.text:
for line in entry:
f.write(line)
f.close()

with open('changes.txt', 'r+') as f:
with open("changes.txt", "a") as f:
f.write(self.rel_title_str + "\n")
for entry in self.text:
for line in entry:
f.write(line)
f.close()

with open("changes.txt", "r+") as f:
new_changes = f.read()
with open(self.path, 'r') as contents:
with open(self.path) as contents:
save = contents.read()
with open(self.path, 'w') as contents:
with open(self.path, "w") as contents:
contents.write(new_changes)
with open(self.path, 'a') as contents:
with open(self.path, "a") as contents:
contents.write(save)


@click.command()
@click.option(
'--github_token', type=str, default=''
"--github_token",
type=str,
default="",
)
@click.option(
"--previous", type=str, default=''
"--previous",
type=str,
default="",
)
@click.option(
"--current", type=str, default=''
"--current",
type=str,
default="",
)
@click.option(
"--path",
type=str,
default='',
help='absolute path to changelog',
"--path",
type=str,
default="../marquez/CHANGELOG.md",
help="path to changelog",
)

def main(
github_token: str,
previous: str,
current: str,
path: str,
):
c = GetChanges(
github_token=github_token,
previous=previous,
current=current,
path=path
github_token=github_token,
previous=previous,
current=current,
path=path,
)
c.get_pulls()
c.describe_changes()
c.write_title()
c.update_changelog()
c.get_new_contributors()
print('...done!')
c.print_new_contributors()
print("...done!")


if __name__ == "__main__":
main()

0 comments on commit beb00b8

Please sign in to comment.