Skip to content

tools: show the launch stage of lagging APIs#15614

Merged
jskeet merged 1 commit into
googleapis:mainfrom
jskeet:lagging-show-launch
May 12, 2026
Merged

tools: show the launch stage of lagging APIs#15614
jskeet merged 1 commit into
googleapis:mainfrom
jskeet:lagging-show-launch

Conversation

@jskeet
Copy link
Copy Markdown
Collaborator

@jskeet jskeet commented May 12, 2026

This just finds the launch stage from the service config, where it's present. (In many cases it's absent, but that's mostly historical.)

@jskeet jskeet requested a review from amanda-tarafa May 12, 2026 07:57
@jskeet jskeet requested a review from a team as a code owner May 12, 2026 07:57
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-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.

Code Review

This pull request updates the ShowLaggingCommand to include the launch stage of lagging packages in its output by parsing service configuration YAML files from the googleapis repository. The review feedback recommends optimizing performance by deferring the GetLaunchStage call until after confirming a package is lagging, using standard string alignment instead of manual padding for the console output, and adding a file existence check to prevent potential exceptions during YAML parsing.

Comment thread tools/Google.Cloud.Tools.ReleaseManager/ShowLaggingCommand.cs Outdated
Comment thread tools/Google.Cloud.Tools.ReleaseManager/ShowLaggingCommand.cs Outdated
{
return null;
}
var service = ApiAnalyzer.ParseServiceConfigYaml(Path.Combine(googleapis, api.ProtoPath, api.ServiceConfigFile));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Add a check to ensure the service configuration file exists before attempting to parse it. This prevents potential FileNotFoundException if the local googleapis repository is incomplete.

            var path = Path.Combine(googleapis, api.ProtoPath, api.ServiceConfigFile);
            if (!File.Exists(path))
            {
                return null;
            }
            var service = ApiAnalyzer.ParseServiceConfigYaml(path);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not done - if the file should exist but doesn't, it's better to fail so that the user can update their googleapis clone than silently not giving the output.

@jskeet jskeet force-pushed the lagging-show-launch branch from 9c668cf to 5ef49ec Compare May 12, 2026 08:02
This just finds the launch stage from the service config, where it's
present. (In many cases it's absent, but that's mostly historical.)
@jskeet jskeet force-pushed the lagging-show-launch branch from 5ef49ec to 8d7f8ef Compare May 12, 2026 08:03
@jskeet jskeet merged commit 9ad8d1b into googleapis:main May 12, 2026
12 checks passed
@jskeet jskeet deleted the lagging-show-launch branch May 12, 2026 16:39
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.

2 participants