Skip to content

Ensure we log what the HTTP error message is if we get a failure #78418

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jasonmalinowski
Copy link
Member

No description provided.

Just because one is missing doesn't mean we should skip validating
the rest; that way you can see if there's a single one missing
or a bunch missing.
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner May 2, 2025 19:41
@ghost ghost added Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead labels May 2, 2025
await Console.Error.WriteLineAsync($"Missing entry in {fileWithPath}").ConfigureAwait(false);
await Console.Error.WriteLineAsync(line).ConfigureAwait(false);
// The file is missing an entry. Mark it as invalid and break the loop as there is no need to continue validating.
Copy link
Member Author

Choose a reason for hiding this comment

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

Stopping further validation seems odd, because it means you might not necessarily know the extent of a potential problem.

{
try
{
if (!Uri.TryCreate(helpLink, UriKind.Absolute, out var uri))
{
return false;
// TODO: why would we not fail this if the URI is invalid?
return (HttpStatusCode.OK, null);
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this should definitely fail (it did before as well) and not return ok

{
// Rule with valid documentation link
if (string.IsNullOrWhiteSpace(helpLinkUri))
continue;
Copy link
Member

Choose a reason for hiding this comment

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

unless I am misreading this, we will now pass validation if the help link is missing, which isn't what we did before. seems like a missing link should fail validation

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, you're right. Will fix.

@jasonmalinowski jasonmalinowski self-assigned this May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants