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

Update latest folder with one index.html includes the redirect links #1298

Merged
4 commits merged into from
Jan 6, 2021

Conversation

sima-zhu
Copy link
Contributor

@sima-zhu sima-zhu commented Jan 4, 2021

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@sima-zhu sima-zhu marked this pull request as ready for review January 5, 2021 01:47
@sima-zhu sima-zhu requested a review from a team as a code owner January 5, 2021 01:47
@sima-zhu sima-zhu requested review from weshaggard and removed request for a team January 5, 2021 01:48
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

LogDebug "Fetching the latest version. $latestVersion"
# Prepare the index.html which can redirect to the latest GA whenever avaiable, otherwise point to latest preview.
New-Item -Path $DocDir -Name "latest" -ItemType "directory"
New-Item -Path "$($DocDir)/latest" -Name "index.html" -ItemType "file" -Value "<meta http-equiv=`"refresh`" content=`"0; URL=$($DocDest)/$($PkgName)/$($latestVersion)/index.html`" />"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any downsides to using the meta refresh tag in terms of SEO or anything like that?

https://www.weboptimizers.com.au/google-warning-meta-refresh/

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we care about our search indexing for these pages so I'm not worried about that. The reason we are using meta refresh for redirecting is because that is the only way we could figure out how to do a redirect while using blob storage as a web host. Ideally we would use server redirects of some sort but we don't have that support in blob storage hosting. If you have other ideas that might work I'd be interested in other ideas.

Copy link
Member

Choose a reason for hiding this comment

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

@scbedd did you consider this option when you originally did started including the latest folder? Do you know of any potential issues based one your known usage of the latest folder?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think people will be linking directly to any /latest/<some subfolder>/blah.html anywhere. Given that, I can't think of any situations that this breaks.

{
LogDebug "Uploading $($PkgName) to latest folder in $($DocDest)..."
& $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/latest$($SASKey)" --recursive=true --cache-control "max-age=300, must-revalidate"
# Clean up existing folders, will remove this step once we have one or two release cycles.
& $($AzCopy) rm "$($DocDest)/$($PkgName)/latest$($SASKey)" --recursive=true
Copy link
Member

Choose a reason for hiding this comment

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

We should see if we can do this as a one-time step for everything in the blob storage to avoid needing to delete and also to ensure we are consistent with our existing published docs.

}
LogDebug "Fetching the latest version. $latestVersion"
# Prepare the index.html which can redirect to the latest GA whenever avaiable, otherwise point to latest preview.
New-Item -Path $DocDir -Name "latest" -ItemType "directory"
Copy link
Member

Choose a reason for hiding this comment

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

We should probably also guard these New-Item creations behind the same uploadlatest and latestVersion condition.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Please Talk with @scbedd to make sure he doesn't know of any issues with this approach.

Copy link
Member

@scbedd scbedd left a comment

Choose a reason for hiding this comment

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

I'm fairly confident that everyone linking to the latest only links to the base index.html, so you should be fine here.

@scbedd
Copy link
Member

scbedd commented Jan 5, 2021

Copy link
Member

@scbedd scbedd left a comment

Choose a reason for hiding this comment

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

We do link directly to some latest documents.

@weshaggard
Copy link
Member

@scbedd where are those links coming from?

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@ghost
Copy link

ghost commented Jan 6, 2021

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 4d46541 into Azure:master Jan 6, 2021
@sima-zhu sima-zhu deleted the lastest_ga branch January 6, 2021 17:02
This pull request was closed.
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.

5 participants