Skip to content

Commit

Permalink
Merge branch 'main' into bug/fix-event-viewer-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
wslulciuc authored Dec 6, 2022
2 parents c935d72 + 0995b0a commit 12002c7
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 37 deletions.
46 changes: 46 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
labels:
- "dependencies"
- "dependabot"

- package-ecosystem: "gradle"
directory: "clients/java"
schedule:
interval: "weekly"
day: "sunday"
labels:
- "dependencies"
- "dependabot"

- package-ecosystem: "gradle"
directory: "web"
schedule:
interval: "weekly"
day: "sunday"
labels:
- "dependencies"
- "dependabot"

- package-ecosystem: "gradle"
directory: "api"
schedule:
interval: "weekly"
day: "sunday"
labels:
- "dependencies"
- "dependabot"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
labels:
- "dependencies"
- "dependabot"
29 changes: 29 additions & 0 deletions chart/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{{- if .Values.ingress.enabled -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ include "common.names.fullname" . }}
Expand All @@ -15,6 +21,9 @@ metadata:
{{ $key }}: {{ include "common.tplvalues.render" (dict "value" $value "context" $) | quote }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
Expand All @@ -31,12 +40,32 @@ spec:
http:
paths:
- path: /api/
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ include "common.names.fullname" $ }}
port:
name: http
{{- else }}
serviceName: {{ include "common.names.fullname" $ }}
servicePort: http
{{- end }}
- path: /
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ include "common.names.fullname" $ }}-web
port:
name: http
{{- else }}
serviceName: {{ include "common.names.fullname" $ }}-web
servicePort: http
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ postgresql:
## @param image.tag PostgreSQL image tag (immutable tags are recommended)
##
image:
tag: 0.28.0
tag: 12.1.0
## Authentication parameters
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#creating-a-database-on-first-run
Expand Down
36 changes: 30 additions & 6 deletions clients/python/marquez_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,18 @@ def get_job_run(self, run_id):
Utils.is_valid_uuid(run_id, 'run_id')
return self._get(self._url('/jobs/runs/{0}', run_id))

def get_column_lineage_by_dataset(self, namespace, dataset, depth=None, with_downstream=None):
node_id = "dataset:{0}:{1}".format(namespace, dataset)
def get_column_lineage_by_dataset(
self,
namespace,
dataset,
depth=None,
with_downstream=None,
version=None
):
node_id = self._append_version_to_node_id(
"dataset:{0}:{1}".format(namespace, dataset),
version
)
return self._get_column_lineage(node_id, depth, with_downstream)

def get_column_lineage_by_dataset_field(
Expand All @@ -353,15 +363,29 @@ def get_column_lineage_by_dataset_field(
dataset,
field,
depth=None,
with_downstream=None
with_downstream=None,
version=None,
):
node_id = "datasetField:{0}:{1}:{2}".format(namespace, dataset, field)
node_id = self._append_version_to_node_id(
"datasetField:{0}:{1}:{2}".format(namespace, dataset, field),
version
)
return self._get_column_lineage(node_id, depth, with_downstream)

def get_column_lineage_by_job(self, namespace, job, depth=None, with_downstream=None):
node_id = "job:{0}:{1}".format(namespace, job)
def get_column_lineage_by_job(self, namespace, job, depth=None,
with_downstream=None, version=None):
node_id = self._append_version_to_node_id(
"job:{0}:{1}".format(namespace, job),
version
)
return self._get_column_lineage(node_id, depth, with_downstream)

def _append_version_to_node_id(self, node_id, version):
if version is not None:
return node_id + "#" + version
else:
return node_id

def _get_column_lineage(self, node_id, depth, with_downstream):
return self._get(
self._url('/column-lineage'),
Expand Down
42 changes: 12 additions & 30 deletions clients/python/tests/test_marquez_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,21 +979,16 @@ def test_get_column_lineage_by_dataset(mock_get, client):
mock_get.return_value.json.return_value = COLUMN_LINEAGE

column_lineage = client.get_column_lineage_by_dataset(
"namespace_a",
"dataset_a",
DEFAULT_DEPTH,
DEFAULT_WITH_DOWNSTREAM
namespace="namespace_a", dataset="dataset_a", depth=DEFAULT_DEPTH,
with_downstream=DEFAULT_WITH_DOWNSTREAM, version="some-version"
)

assert column_lineage == COLUMN_LINEAGE

mock_get.assert_called_once_with(
url=client._url(
'/column-lineage'
),
url=client._url('/column-lineage'),
headers=mock.ANY,
params={
'nodeId': 'dataset:namespace_a:dataset_a',
'nodeId': 'dataset:namespace_a:dataset_a#some-version',
'depth': DEFAULT_DEPTH,
'withDownstream': DEFAULT_WITH_DOWNSTREAM
},
Expand All @@ -1005,24 +1000,17 @@ def test_get_column_lineage_by_dataset(mock_get, client):
def test_get_column_lineage_by_dataset_field(mock_get, client):
mock_get.return_value.status_code.return_value = HTTPStatus.OK
mock_get.return_value.json.return_value = COLUMN_LINEAGE

column_lineage = client.get_column_lineage_by_dataset_field(
"namespace_a",
"dataset_a",
"field_a",
DEFAULT_DEPTH,
DEFAULT_WITH_DOWNSTREAM
namespace="namespace_a", dataset="dataset_a", field="field_a", depth=DEFAULT_DEPTH,
with_downstream=DEFAULT_WITH_DOWNSTREAM, version="some-version"
)

assert column_lineage == COLUMN_LINEAGE

mock_get.assert_called_once_with(
url=client._url(
'/column-lineage'
),
url=client._url('/column-lineage'),
headers=mock.ANY,
params={
'nodeId': 'datasetField:namespace_a:dataset_a:field_a',
'nodeId': 'datasetField:namespace_a:dataset_a:field_a#some-version',
'depth': DEFAULT_DEPTH,
'withDownstream': DEFAULT_WITH_DOWNSTREAM
},
Expand All @@ -1034,23 +1022,17 @@ def test_get_column_lineage_by_dataset_field(mock_get, client):
def test_get_column_lineage_by_job(mock_get, client):
mock_get.return_value.status_code.return_value = HTTPStatus.OK
mock_get.return_value.json.return_value = COLUMN_LINEAGE

column_lineage = client.get_column_lineage_by_job(
"namespace_a",
"job_a",
DEFAULT_DEPTH,
DEFAULT_WITH_DOWNSTREAM
namespace="namespace_a", job="job_a", depth=DEFAULT_DEPTH,
with_downstream=DEFAULT_WITH_DOWNSTREAM, version="some-version"
)

assert column_lineage == COLUMN_LINEAGE

mock_get.assert_called_once_with(
url=client._url(
'/column-lineage'
),
url=client._url('/column-lineage'),
headers=mock.ANY,
params={
'nodeId': 'job:namespace_a:job_a',
'nodeId': 'job:namespace_a:job_a#some-version',
'depth': DEFAULT_DEPTH,
'withDownstream': DEFAULT_WITH_DOWNSTREAM
},
Expand Down

0 comments on commit 12002c7

Please sign in to comment.