mohamedawnallah commented on code in PR #37673: URL: https://github.com/apache/beam/pull/37673#discussion_r2880575684
########## sdks/go/pkg/beam/runners/dot/dot_test.go: ########## @@ -0,0 +1,67 @@ +// 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. +package dot + +import ( + "context" + "os" + "strings" + "testing" + + "github.com/apache/beam/sdks/v2/go/pkg/beam" + "github.com/apache/beam/sdks/v2/go/pkg/beam/testing/passert" +) + +func TestDotRunner_GeneratesDeterministicOutput(t *testing.T) { + ctx := context.Background() Review Comment: There is an option of the built-in `t.Context()`. It is introduced in Go `v1.24,` and Beam Go SDK supports that version https://github.com/apache/beam/blob/3197d88ef5c9f41371756c78b0efca8590b47165/sdks/go.mod#L23 ########## sdks/go/pkg/beam/core/util/dot/dot.go: ########## @@ -14,6 +14,9 @@ // limitations under the License. // Package dot produces DOT graphs from Beam graph representations. +// +// Deprecated:This package is no longer used by the Beam Go SDK. +// It is slated for removal in a future Beam release. Review Comment: In addition to mentioning this here, perhaps worth adding it in `Deprecations` section in the release notes of the current unreleased version e.g https://github.com/apache/beam/blob/master/CHANGES.md#deprecations ########## sdks/go/pkg/beam/runners/dot/dot_test.go: ########## @@ -0,0 +1,67 @@ +// 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. +package dot + +import ( + "context" + "os" + "strings" + "testing" + + "github.com/apache/beam/sdks/v2/go/pkg/beam" + "github.com/apache/beam/sdks/v2/go/pkg/beam/testing/passert" +) + +func TestDotRunner_GeneratesDeterministicOutput(t *testing.T) { + ctx := context.Background() + + // Create temporary DOT file + tmpFile, err := os.CreateTemp("", "dot_test_*.dot") Review Comment: can be the built-in `t.TempDir()` and it is removed automatically when outside the scope of test ########## sdks/go/pkg/beam/core/util/dot/dot.go: ########## @@ -14,6 +14,9 @@ // limitations under the License. // Package dot produces DOT graphs from Beam graph representations. +// +// Deprecated:This package is no longer used by the Beam Go SDK. Review Comment: ```suggestion // Deprecated: This package is no longer used by the Beam Go SDK. ``` -- 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]
