Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(all): minimum supported version is now go 1.23 #5124

Closed
wants to merge 9 commits into from

Conversation

Valeriy-Burlaka
Copy link
Member

@Valeriy-Burlaka Valeriy-Burlaka commented Feb 3, 2025

Description

Bumps the go version to 1.23.0 because it's the minimum required by the new GenAI SDK. This is needed to support creation of new GenAI sample (e.g., #5125, #5127)

Checklist

  • I have followed Contributing Guidelines from CONTRIBUTING.MD
  • Tests pass: go test -v ./..
  • Code formatted: gofmt
  • Vetting pass: go vet
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@Valeriy-Burlaka Valeriy-Burlaka requested review from a team as code owners February 3, 2025 21:20
Copy link

snippet-bot bot commented Feb 3, 2025

No region tags are edited in this PR.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Feb 3, 2025
@Valeriy-Burlaka Valeriy-Burlaka self-assigned this Feb 3, 2025
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi team,

I'm currently reviewing this pull request and will post my feedback in a few minutes. In the meantime, here's a summary of the changes for you and other reviewers to quickly get up to speed:

This pull request, authored by Valeriy-Burlaka, aims to add text generation capabilities to the GenAI SDK samples. The key changes include:

  • New GenAI SDK Sample Directory: A new directory has been created to house samples for the GenAI SDK. -- [VB 05/02/2025]: This was moved to another PR. This PR focuses only on chores part for the new GenAI SDK.
  • Go Version Bump: The go version has been updated from 1.22.0 to 1.23.0 to meet the minimum requirements of the GenAI SDK (as per this go.mod file). This change affects nearly all go.mod files in the repository.
  • Initial Text Generation Sample and Test: A first code sample demonstrating text generation from a text prompt has been added, along with a corresponding test case. The sample uses the gemini-2.0-flash-001 model and the generateWithText function.
  • Updated go.sum file: The go.sum file has been updated to reflect the changes in the dependency versions.

The following table summarizes the changes to go.mod files:

File Go Version (Before) Go Version (After)
aiplatform/go.mod 1.22.0 1.23.0
appengine/go.mod 1.22.0 1.23.0
appengine/go11x/cloudsql/go.mod 1.22.0 1.23.0
appengine/go11x/helloworld/go.mod 1.22.0 1.23.0
appengine/go11x/tasks/handle_task/go.mod 1.22.0 1.23.0
appengine/go11x/warmup/go.mod 1.22.0 1.23.0
appengine_flexible/analytics/go.mod 1.22.0 1.23.0
appengine_flexible/datastore/go.mod 1.22.0 1.23.0
appengine_flexible/go115_and_earlier/go.mod 1.22.0 1.23.0
appengine_flexible/helloworld/go.mod 1.22.0 1.23.0
appengine_flexible/pubsub/go.mod 1.22.0 1.23.0
appengine_flexible/redis/go.mod 1.22.0 1.23.0
appengine_flexible/static_files/go.mod 1.22.0 1.23.0
appengine_flexible/storage/go.mod 1.22.0 1.23.0
appengine_flexible/websockets/go.mod 1.22.0 1.23.0
asset/go.mod 1.22.0 1.23.0
auth/go.mod 1.22.0 1.23.0
automl/go.mod 1.22.0 1.23.0
bigquery/go.mod 1.22.0 1.23.0
bigtable/go.mod 1.22.0 1.23.0
cdn/go.mod 1.22.0 1.23.0
cloudsql/mysql/database-sql/go.mod 1.22.0 1.23.0
cloudsql/postgres/database-sql/go.mod 1.22.0 1.23.0
cloudsql/sqlserver/database-sql/go.mod 1.22.0 1.23.0
compute/go.mod 1.22.0 1.23.0
compute/quickstart/go.mod 1.22.0 1.23.0
container_registry/go.mod 1.22.0 1.23.0
datacatalog/go.mod 1.22.0 1.23.0
dataflow/go.mod 1.22.0 1.23.0
dataproc/go.mod 1.22.0 1.23.0
datastore/go.mod 1.22.0 1.23.0
dialogflow/go.mod 1.22.0 1.23.0
dlp/go.mod 1.22.0 1.23.0
docs/go.mod 1.22.0 1.23.0
documentai/go.mod 1.22.0 1.23.0
endpoints/go.mod 1.22.0 1.23.0
eventarc/audit_iam/go.mod 1.22.0 1.23.0
eventarc/audit_storage/go.mod 1.22.0 1.23.0
eventarc/generic/go.mod 1.22.0 1.23.0
eventarc/pubsub/go.mod 1.22.0 1.23.0
eventarc/storage_handler/go.mod 1.22.0 1.23.0
eventarc/testing/go.mod 1.22.0 1.23.0
firestore/go.mod 1.22.0 1.23.0
functions/bigtable/go.mod 1.22.0 1.23.0
functions/codelabs/gopher/go.mod 1.22.0 1.23.0
functions/console_snippets/firebase_auth/go.mod 1.22.0 1.23.0
functions/console_snippets/firebase_rtdb/go.mod 1.22.0 1.23.0
functions/console_snippets/firestore/go.mod 1.22.0 1.23.0
functions/console_snippets/google_analytics/go.mod 1.22.0 1.23.0
functions/firebase/hello/go.mod 1.22.0 1.23.0
functions/firebase/upper/go.mod 1.22.0 1.23.0
functions/functionsv2/firebase/hellofirestore/go.mod 1.22.0 1.23.0
functions/functionsv2/firebase/remoteconfig/go.mod 1.22.0 1.23.0
functions/functionsv2/firebase/rtdb/go.mod 1.22.0 1.23.0
functions/functionsv2/firebase/upper/go.mod 1.22.0 1.23.0
functions/functionsv2/helloauditlog/go.mod 1.22.0 1.23.0
functions/functionsv2/hellopubsub/go.mod 1.22.0 1.23.0
functions/functionsv2/hellostorage/go.mod 1.22.0 1.23.0
functions/functionsv2/helloworld/go.mod 1.22.0 1.23.0
functions/functionsv2/imagemagick/go.mod 1.22.0 1.23.0
functions/functionsv2/label_gce_instance/go.mod 1.22.0 1.23.0
functions/functionsv2/log/go.mod 1.22.0 1.23.0
functions/functionsv2/ocr/app/go.mod 1.22.0 1.23.0
functions/functionsv2/response_streaming/go.mod 1.22.0 1.23.0
functions/functionsv2/slack/go.mod 1.22.0 1.23.0
functions/functionsv2/tips/go.mod 1.22.0 1.23.0
functions/functionsv2/tips/infinite_retries/go.mod 1.22.0 1.23.0
functions/go.mod 1.22.0 1.23.0
functions/helloworld/go.mod 1.22.0 1.23.0
functions/http/go.mod 1.22.0 1.23.0
functions/imagemagick/go.mod 1.22.0 1.23.0
functions/log/go.mod 1.22.0 1.23.0
functions/memorystore/redis/go.mod 1.22.0 1.23.0
functions/ocr/app/go.mod 1.22.0 1.23.0
functions/security/go.mod 1.22.0 1.23.0
functions/slack/go.mod 1.22.0 1.23.0
functions/spanner/go.mod 1.22.0 1.23.0
functions/tips/go.mod 1.22.0 1.23.0
functions/tips/infinite_retries/go.mod 1.22.0 1.23.0
functions/typed/greeting/go.mod 1.22.0 1.23.0
genai/go.mod N/A 1.23.0
getting-started/authenticating-users/go.mod 1.22.0 1.23.0
getting-started/background/go.mod 1.22.0 1.23.0
getting-started/bookshelf/go.mod 1.22.0 1.23.0
getting-started/gce/go.mod 1.22.0 1.23.0
getting-started/go.mod 1.22.0 1.23.0
getting-started/gopher-run/go.mod 1.22.0 1.23.0
getting-started/sessions/go.mod 1.22.0 1.23.0
go.mod 1.22.0 1.23.0
healthcare/go.mod 1.22.0 1.23.0
iam/go.mod 1.22.0 1.23.0
iap/go.mod 1.22.0 1.23.0
internal/cloudrunci/testingapp/go.mod 1.22.0 1.23.0
internal/gomodversiontest/go.mod 1.22.0 1.23.0
internal/managedkafka/go.mod 1.22.0 1.23.0
jobs/go.mod 1.22.0 1.23.0
kms/go.mod 1.22.0 1.23.0
language/go.mod 1.22.0 1.23.0
logging/go.mod 1.22.0 1.23.0
managedkafka/go.mod 1.22.0 1.23.0
media/go.mod 1.22.0 1.23.0
memorystore/go.mod 1.22.0 1.23.0
monitoring/go.mod 1.22.0 1.23.0
opentelemetry/instrumentation/app/go.mod 1.22.0 1.23.0
opentelemetry/trace/go.mod 1.22.0 1.23.0
privateca/go.mod 1.22.0 1.23.0
profiler/go.mod 1.22.0 1.23.0
profiler/shakesapp/go.mod 1.22.0 1.23.0
pubsub/go.mod 1.22.0 1.23.0
pubsublite/go.mod 1.22.0 1.23.0
routeoptimization/go.mod 1.22.0 1.23.0
run/custom-metrics/go.mod 1.22.0 1.23.0
run/go.mod 1.22.0 1.23.0
run/grpc-ping/go.mod 1.22.0 1.23.0
run/grpc-server-streaming/go.mod 1.22.0 1.23.0
run/h2c/go.mod 1.22.0 1.23.0
run/hello-broken/go.mod 1.22.0 1.23.0
run/helloworld/go.mod 1.22.0 1.23.0
run/image-processing/go.mod 1.22.0 1.23.0
run/jobs/go.mod 1.22.0 1.23.0
run/logging-manual/go.mod 1.22.0 1.23.0
run/markdown-preview/editor/go.mod 1.22.0 1.23.0
run/markdown-preview/renderer/go.mod 1.22.0 1.23.0
run/pubsub/go.mod 1.22.0 1.23.0
run/sigterm-handler/go.mod 1.22.0 1.23.0
run/system_package/go.mod 1.22.0 1.23.0
run/testing/go.mod 1.22.0 1.23.0
secretmanager/go.mod 1.22.0 1.23.0
securitycenter/go.mod 1.22.0 1.23.0
servicedirectory/go.mod 1.22.0 1.23.0
spanner/go.mod 1.22.0 1.23.0
spanner/opentelemetry/go.mod 1.22.0 1.23.0
spanner/opentelemetry/tracing/go.mod 1.22.0 1.23.0
speech/go.mod 1.22.0 1.23.0
storage/go.mod 1.22.0 1.23.0
storagetransfer/go.mod 1.22.0 1.23.0
tasks/go.mod 1.22.0 1.23.0
testing/gimmeproj/go.mod 1.22.0 1.23.0
texttospeech/go.mod 1.22.0 1.23.0
trace/go.mod 1.22.0 1.23.0
translate/go.mod 1.22.0 1.23.0
vertexai/batch-predict/go.mod 1.22.0 1.23.0
vertexai/chat/go.mod 1.22.0 1.23.0
vertexai/context-caching/go.mod 1.22.0 1.23.0
vertexai/controlled-generation/go.mod 1.22.0 1.23.0
vertexai/embeddings/go.mod 1.22.0 1.23.0
vertexai/evaluation/go.mod 1.22.0 1.23.0
vertexai/function-calling/go.mod 1.22.0 1.23.0
vertexai/gemma2/go.mod 1.22.0 1.23.0
vertexai/multimodal-all/go.mod 1.22.0 1.23.0
vertexai/multimodal-audio/go.mod 1.22.0 1.23.0
vertexai/multimodal-multiple/go.mod 1.22.0 1.23.0
vertexai/multimodal-pdf/go.mod 1.22.0 1.23.0
vertexai/multimodal-video-with-audio/go.mod 1.22.0 1.23.0
vertexai/multimodal-video/go.mod 1.22.0 1.23.0
vertexai/multimodal/go.mod 1.22.0 1.23.0
vertexai/safety-settings-multimodal/go.mod 1.22.0 1.23.0
vertexai/safety-settings/go.mod 1.22.0 1.23.0
vertexai/snippets/go.mod 1.22.0 1.23.0
vertexai/stream-multimodality-basic/go.mod 1.22.0 1.23.0
vertexai/stream-text-basic/go.mod 1.22.0 1.23.0
vertexai/system-instruction/go.mod 1.22.0 1.23.0
vertexai/token-count/go.mod 1.22.0 1.23.0
videointelligence/go.mod 1.22.0 1.23.0
vision/go.mod 1.22.0 1.23.0

The author has also added a test file (genai/text_generation/text_generation_test.go) and a sample implementation file (genai/text_generation/textgen_with_txt.go).

I'll provide a more detailed review shortly.

Short poem:

Code flows like a stream,
Tests run, a gentle cascade,
Bugs vanish in mist.

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request introduces a new sample for text generation using the GenAI SDK. -- [VB 05/02/2025]: This was moved to another PR. This PR focuses only on chores part for the new GenAI SDK.
~~ It also updates the Go version to 1.23.0, which is the minimum required version for the new GenAI SDK. The changes are well-organized and follow the contributing guidelines. Here are a few suggestions for improvement:

  • Consider adding more details to the example response in textgen_with_txt.go to illustrate the format of the generated text.
  • Update the checklist in the pull request description to reflect the addition of the new sample directory and API.
  • Add a README file for the new genai directory to explain how to run the samples and any prerequisites.

@Valeriy-Burlaka Valeriy-Burlaka self-assigned this Feb 5, 2025
@Valeriy-Burlaka
Copy link
Member Author

Valeriy-Burlaka commented Feb 5, 2025

The mass test failure happens because it's still pulling go 1.22 image, which means I missed to update some config (in this repository?) when bumping Go from 1.22 to 1.23 for the entire workspace.

I'm investigating this and would appreciate any hints and pointers:

Screenshot 2025-02-05 at 11 08 22


Screenshot 2025-02-05 at 11 08 32

@Valeriy-Burlaka Valeriy-Burlaka marked this pull request as draft February 5, 2025 10:32
@Valeriy-Burlaka Valeriy-Burlaka changed the title feat(genai sdk): generate text content from text prompt chore(all): minimum supported version is now go 1.23 Feb 5, 2025
@Valeriy-Burlaka
Copy link
Member Author

Valeriy-Burlaka commented Feb 5, 2025

Most of test failures are now gone 🥳 (thanks to #5093 serving as a guidance for which files need to be updated).

The remaining failure seems transient?

2025/02/05 11:30:32 Temporary error: datastore: could not find a free project
context deadline exceeded

@Valeriy-Burlaka Valeriy-Burlaka marked this pull request as ready for review February 5, 2025 11:40
@Valeriy-Burlaka Valeriy-Burlaka removed their assignment Feb 5, 2025
@Valeriy-Burlaka Valeriy-Burlaka added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2025
@telpirion
Copy link
Collaborator

telpirion commented Feb 6, 2025

I'm closing this PR because we have to support all of the Go versions that the Cloud client libraries support.

See here: https://github.com/googleapis/google-cloud-go?tab=readme-ov-file#go-versions-supported

@muncus @iennae FYI

@telpirion telpirion closed this Feb 6, 2025
@Valeriy-Burlaka
Copy link
Member Author

Valeriy-Burlaka commented Feb 6, 2025

@telpirion , I don't understand. Isn't the PR making a step forward to test the library support for 1.23? Besides, that's what the new GenAI SDK for Go requires1.23. We can't move forward with 1.22.7 for the workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants