amoghrajesh commented on code in PR #76575:
URL: https://github.com/apache/airflow/pull/76575#discussion_r4520301048
##########
dev/registry/tests/test_extract_parameters.py:
##########
@@ -443,6 +446,45 @@ def execute(self, context):
assert is_durable_capable(ExplicitDelegatesToIntermediate,
FakeResumableJobMixin) is True
+class TestDurableMetadata:
Review Comment:
Added three fixtures, one per way of writing it: `durable: bool = False`,
`durable: bool = True`, and `durable: bool | None = None`. Plus one with no
`durable` at all.
The field is `durable_opt_in` now, so the assertion is that only the
explicit `False` case is `true`. Hard-coding it either way fails.
##########
dev/registry/tests/test_fill_durable_versions.py:
##########
@@ -0,0 +1,231 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from __future__ import annotations
+
+import json
+import subprocess
+from unittest import mock
+
+import pytest
+from fill_durable_versions import (
+ GitCommandError,
+ build_source_path,
+ durable_group,
+ find_first_releases,
+ get_released_tags,
+ main,
+ run_git,
+)
+
+POD_PATH =
"providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py"
+POD_CLASS =
"airflow.providers.cncf.kubernetes.operators.pod.KubernetesPodOperator"
+
+
[email protected](autouse=True)
+def clear_tag_cache():
+ get_released_tags.cache_clear()
+ yield
+ get_released_tags.cache_clear()
+
+
+def fake_git(tags=(), matches=()):
Review Comment:
`fake_git` now checks the grep argv: `-lE`, the token, the tags, `--`, the
sorted paths, and
`allowed_returncodes`. Dropping the flag fails.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]