From 9219a49cce4424ecfaffbd4c04728d6d4576bd41 Mon Sep 17 00:00:00 2001 From: Jeffrey Kinard Date: Tue, 3 Dec 2024 19:42:06 -0500 Subject: [PATCH] add deprecation note Signed-off-by: Jeffrey Kinard --- .../pubsublite/PubsubLiteReadSchemaTransformProvider.java | 7 +++++++ .../pubsublite/PubsubLiteWriteSchemaTransformProvider.java | 7 +++++++ sdks/python/apache_beam/yaml/generate_yaml_docs.py | 7 ++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteReadSchemaTransformProvider.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteReadSchemaTransformProvider.java index 9e83619f7b8d..61b94aeee445 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteReadSchemaTransformProvider.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteReadSchemaTransformProvider.java @@ -87,6 +87,13 @@ protected Class configurationClass() return PubsubLiteReadSchemaTransformConfiguration.class; } + @Override + public String description() { + return "Performs a read from Google Pub/Sub Lite.\n" + + "\n" + + "**Note**: This provider is deprecated. See Pub/Sub Lite documentation for more information."; + } + public static class ErrorFn extends DoFn { private final SerializableFunction valueMapper; private final Counter errorCounter; diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteWriteSchemaTransformProvider.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteWriteSchemaTransformProvider.java index ebca921c57e1..54ed7ac495d9 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteWriteSchemaTransformProvider.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/PubsubLiteWriteSchemaTransformProvider.java @@ -82,6 +82,13 @@ protected Class configurationClass( return PubsubLiteWriteSchemaTransformConfiguration.class; } + @Override + public String description() { + return "Performs a write to Google Pub/Sub Lite.\n" + + "\n" + + "**Note**: This provider is deprecated. See Pub/Sub Lite documentation for more information."; + } + public static class ErrorCounterFn extends DoFn { private final SerializableFunction toBytesFn; private final Counter errorCounter; diff --git a/sdks/python/apache_beam/yaml/generate_yaml_docs.py b/sdks/python/apache_beam/yaml/generate_yaml_docs.py index d11360cc4aeb..38a888fdebe3 100644 --- a/sdks/python/apache_beam/yaml/generate_yaml_docs.py +++ b/sdks/python/apache_beam/yaml/generate_yaml_docs.py @@ -189,11 +189,8 @@ def io_grouping_key(transform_name): return 0, transform_name -# Deprecated providers -SKIP = { - 'ReadFromPubSubLite', - 'WriteToPubSubLite', -} +# Exclude providers +SKIP = {} def transform_docs(transform_base, transforms, providers, extra_docs=''):