Skip to content

Conversation

@annafang-google
Copy link
Contributor

Replace hardcoded default version string with the one specified in version.txt.

@enocom enocom self-requested a review August 11, 2023 13:23
Copy link
Member

@enocom enocom left a comment

Choose a reason for hiding this comment

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

Looks great! A few minor things to fix here.

Also, we should add some tests for this code as well.


// versionString indiciates the version of the proxy currently in use.
//
//go:embed version.txt
Copy link
Member

Choose a reason for hiding this comment

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

You'll need to move version.txt to this directory.

Also, we'll need to update the location of this file in .github/release-please.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

version.txt has been moved under proxy/util.
It seems to me that v1 branch doesn't have .github/release-please.yml file. Instead .build/release_artifacts.sh refers to version.txt. I'll update it that one.

Copy link
Contributor Author

@annafang-google annafang-google Aug 11, 2023

Choose a reason for hiding this comment

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

Jack told me offline that the release-please.yml file in main branch needs to be updated. So created this PR #1904. Please let me know if that looks OK. Thanks!

Copy link
Collaborator

@jackwotherspoon jackwotherspoon left a comment

Choose a reason for hiding this comment

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

LGTM ✅ Let's wait and let @enocom take a look on Monday before merging though

//go:embed version.txt
var versionString string

// metadataString indiciates additional build or distribution metadata.
Copy link
Member

Choose a reason for hiding this comment

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

s/indiciates/indicates/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Fixed.

return v
}

// userAgentFromVersionString returns an appropriate user agent string for identifying this proxy process.
Copy link
Member

Choose a reason for hiding this comment

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

Let's try to wrap at 80 characters here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Fixed.

Remove empty line

fixed cloudsqlutil.go format

fix test code

Fixed the typo in the test message

Fixed typo and wrapped the long line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants