Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Auto-generated by create-pull-request action #52

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Auto-generated pull request by create-pull-request GitHub Action

@ScriptAutomate
Copy link
Owner

They were all discovered...but again, when manually checking the LIVE documentation links locally, they are being redirected to the Welcome page?

Something weird is happening.

Specifically, with the following culprits:

{
  "AWS::AutoScaling::AutoScalingGroup.InstancesDistribution": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html",	
  "AWS::AutoScaling::AutoScalingGroup.LaunchTemplate": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplate.html",	
  "AWS::AutoScaling::AutoScalingGroup.LaunchTemplateOverrides": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html",	
  "AWS::AutoScaling::AutoScalingGroup.MixedInstancesPolicy": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-group-mixedinstancespolicy.html",	
  "AWS::CloudFront::Distribution.OriginGroup": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origingroup.html",	
  "AWS::CloudFront::Distribution.OriginGroupFailoverCriteria": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origingroupfailovercriteria.html",	
  "AWS::CloudFront::Distribution.OriginGroupMember": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origingroupmember.html",	
  "AWS::CloudFront::Distribution.OriginGroupMembers": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origingroupmembers.html",	
  "AWS::CloudFront::Distribution.OriginGroups": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origingroups.html",	
  "AWS::CloudFront::Distribution.StatusCodes": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-statuscodes.html",	
  "AWS::CodePipeline::CustomActionType.ArtifactDetails": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-artifactdetails.html",	
  "AWS::CodePipeline::CustomActionType.ConfigurationProperties": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-configurationproperties.html",	
  "AWS::CodePipeline::CustomActionType.Settings": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-settings.html",	
  "AWS::Cognito::UserPool.UsernameConfiguration": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-usernameconfiguration.html",	
  "AWS::OpsWorks::Instance.EbsBlockDevice": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-instance-ebsblockdevice.html",	
  "AWS::OpsWorks::Layer.VolumeConfiguration": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-layer-volumeconfiguration.html"
}

If curl is used, the following result happens:

curl http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-artifactdetails.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-artifactdetails.html">here</a>.</p>
</body></html>

The 301 is claiming that the endpoint has moved...to itself?

The code that has been finding them broken is requests.get(url).url which gives the following when they are broken (redirecting to the root of UserGuide):

'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'

Using the above list of problem links, I'm seeing the following when running in a dev instance:

for doc, link in broken_links.items():
  requests.get(link).url
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/'

As a test, here is a known working result:

working_link = 'http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-bytematchtuple.html'
requests.get(working_link).url
'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-bytematchtuple.html'

I may have to add an extra layer of logging, when the problem links work, and have it output the result of requests.get(link).url in the GitHub Action task log. It is somehow returning a different result on days like today where the returned URL wasn't redirected to the root. Either the documents are stuck in some weird limbo where they are appearing at times, or redirects sometimes have a different result depending on when it runs.

@ScriptAutomate
Copy link
Owner

ScriptAutomate commented Feb 14, 2020

Ah, many of these were audited previously when I was wondering what fixes could potentially exist in documentation-broken-links-detailed.json

There seems to be some strange problem in the publishing of the LIVE docs as part of the AWS documentation build/deploy process.

The main issue is that most of these docs exist, but have been renamed. Their current names can be found within the GitHub source mirror of the docs.

Their values need to be updated in the CloudFormationResourceSpecification.json files, or the server-side redirects need to be pointing to the renamed endpoints.

I am not sure how the old ones are somehow working at times, and not at other times. It seems to be a server-side issue of redirect failures that, at times, are (potentially) properly redirecting. My previous comment shows broken 301 redirect results from curl attempting to redirect to the exact same endpoint that was requested and broken in the first place.

For example, the following endpoint:

Additional info on these and other misc. broken links found here:

@ScriptAutomate ScriptAutomate merged commit 3d25329 into master Feb 14, 2020
@ScriptAutomate ScriptAutomate deleted the create-pull-request/patch-0d6e943 branch February 14, 2020 09:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant