Skip to content

Commit

Permalink
Merge branch 'MarquezProject:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
yanlibert authored Dec 16, 2023
2 parents bec782e + 429e352 commit ea55703
Show file tree
Hide file tree
Showing 54 changed files with 1,560 additions and 343 deletions.
2 changes: 1 addition & 1 deletion .circleci/api-load-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
set -e

# Build version of Marquez
readonly MARQUEZ_VERSION=0.43.0-SNAPSHOT
readonly MARQUEZ_VERSION=0.44.0-SNAPSHOT
# Fully qualified path to marquez.jar
readonly MARQUEZ_JAR="api/build/libs/marquez-api-${MARQUEZ_VERSION}.jar"

Expand Down
2 changes: 1 addition & 1 deletion .circleci/db-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Version of PostgreSQL
readonly POSTGRES_VERSION="14"
# Version of Marquez
readonly MARQUEZ_VERSION=0.42.0
readonly MARQUEZ_VERSION=0.43.0
# Build version of Marquez
readonly MARQUEZ_BUILD_VERSION="$(git log --pretty=format:'%h' -n 1)" # SHA1

Expand Down
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
API_PORT=5000
API_ADMIN_PORT=5001
WEB_PORT=3000
TAG=0.42.0
TAG=0.43.0
35 changes: 30 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +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: 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
27 changes: 27 additions & 0 deletions api/src/main/java/marquez/api/DatasetResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,33 @@ public Response tag(
return Response.ok(dataset).build();
}

@Timed
@ResponseMetered
@ExceptionMetered
@DELETE
@Path("/{dataset}/tags/{tag}")
@Produces(APPLICATION_JSON)
public Response deleteDatasetTag(
@PathParam("namespace") NamespaceName namespaceName,
@PathParam("dataset") DatasetName datasetName,
@PathParam("tag") TagName tagName) {
throwIfNotExists(namespaceName);
throwIfNotExists(namespaceName, datasetName);

log.info(
"Deleted tag '{}' from dataset '{}' on namespace '{}'",
tagName.getValue(),
datasetName.getValue(),
namespaceName.getValue());
datasetService.deleteDatasetTag(
namespaceName.getValue(), datasetName.getValue(), tagName.getValue());
Dataset dataset =
datasetService
.findDatasetByName(namespaceName.getValue(), datasetName.getValue())
.orElseThrow(() -> new DatasetNotFoundException(datasetName));
return Response.ok(dataset).build();
}

@Timed
@ResponseMetered
@ExceptionMetered
Expand Down
27 changes: 27 additions & 0 deletions api/src/main/java/marquez/db/DatasetDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,33 @@ DatasetRow upsert(
""")
Optional<DatasetRow> delete(String namespaceName, String name);

@SqlUpdate(
"""
DELETE FROM datasets_tag_mapping dtm
WHERE EXISTS (
SELECT 1
FROM
datasets d
JOIN
tags t
ON
d.uuid = dtm.dataset_uuid
AND
t.uuid = dtm.tag_uuid
JOIN
namespaces n
ON
d.namespace_uuid = n.uuid
WHERE
d.name = :datasetName
AND
t.name = :tagName
AND
n.name = :namespaceName
);
""")
void deleteDatasetTag(String namespaceName, String datasetName, String tagName);

@Transaction
default Dataset upsertDatasetMeta(
NamespaceName namespaceName, DatasetName datasetName, DatasetMeta datasetMeta) {
Expand Down
Loading

0 comments on commit ea55703

Please sign in to comment.