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

Add a 'version' identifier and a more specific user-agent #1128

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Feb 3, 2021

Motivation:

User-agent string should, ideally, contain a version number.

Modifications:

  • Add a 'Version' struct
  • Use the version string in the user-agent
  • Only check user-provided headers for a user-agent string rather than
    all headers

Result:

  • User-agent string includes version number

Motivation:

User-agent string should, ideally, contain a version number.

Modifications:

- Add a 'Version' struct
- Use the version string in the user-agent
- Only check user-provided headers for a user-agent string rather than
  all headers

Result:

- User-agent string includes version number
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Feb 3, 2021
@glbrntt glbrntt requested a review from Lukasa February 3, 2021 12:08
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Nothing wrong with the patch as-it-stands, though I have a few questions in the diff.

internal static let minor = 0

/// The patch version.
internal static let patch = 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

How are we going to enforce updating this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was also wondering about this. I'm not really sure at the moment because we have to update this before tagging a release, and anything that automates this check needs to know when a release is happening first.

One idea was to validate in CI against git tags, of course that only works after-the-fact so is of limited use, you can at least update it in a patch release straight after tough if the tag was wrong.

A release checklist has the problem as we have now the same as now: you need to remember to look at it.

The other idea I had was to build a check into the release notes drafter since I always run that before a release, definitely a hack though.

Any other ideas?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that hack may be what we need to do for now, sadly.

internal static let minor = 0

/// The patch version.
internal static let patch = 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

An extra question: should this also contain any version qualifiers, e.g. -alpha24?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm being optimistic about what the next version is!

@glbrntt glbrntt merged commit 7cb82cd into grpc:main Feb 3, 2021
@glbrntt glbrntt deleted the gb-user-agent branch February 3, 2021 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants