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

Point pre-installed sample source links to permanent URIs #2721

Closed
Ark-kun opened this issue Dec 11, 2019 · 9 comments
Closed

Point pre-installed sample source links to permanent URIs #2721

Ark-kun opened this issue Dec 11, 2019 · 9 comments
Assignees
Labels
area/backend area/engprod lifecycle/stale The issue / pull request is stale, any activities remove this label. priority/p1

Comments

@Ark-kun
Copy link
Contributor

Ark-kun commented Dec 11, 2019

Otherwise the links stop working when the samples are moved.

@Bobgy
Copy link
Contributor

Bobgy commented Dec 12, 2019

It seems @numerology has already been doing this: #2722

@numerology
Copy link

Summarize some discussion in #2722 here.

Pointing source links to permalinks can fix the 404 error for now, but it falls short in that our future update to READMEs and source codes won't be reflected in the preload samples in a timely manner.

One possible solution of that would be include some link checks in presubmit tests, to guarantee all the links in the docs and samples are not broken by the PR.

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Dec 12, 2019

it falls short in that our future update to READMEs and source codes won't be reflected in the preload samples in a timely manner.

But the source code would be correct (corresponding to the preloaded sample).

We can use version tag instead of commit hash to make it easier to update the samples config.

Another option might be to build/modify the config during the image building.

@numerology
Copy link

But the source code would be correct (corresponding to the preloaded sample).

Not exactly sure I understand... Are you suggesting there is a way to use permalink while keep the source code up-to-date at the same time?

@Bobgy
Copy link
Contributor

Bobgy commented Dec 13, 2019

Another option might be to build/modify the config during the image building.

This sounds like a good idea to me.

@Bobgy
Copy link
Contributor

Bobgy commented Dec 13, 2019

Adjusting on that

  1. Pin sample links to current commit SHA during image build
  2. Add a presubmit test using a tool like https://github.com/remarkjs/remark-validate-links to detect anything is moved or no longer valid.

Extra benefit comparing to pinning directly in source code:

  • github repo links are always pointing to current version (instead of doc links are only updated on release)
  • no extra step in release management

@numerology
Copy link

@Bobgy That looks good to me. I can try to do item 2.

@stale
Copy link

stale bot commented Jun 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale The issue / pull request is stale, any activities remove this label. label Jun 24, 2020
@Bobgy
Copy link
Contributor

Bobgy commented Jun 29, 2020

We've done this in above PRs.

@Bobgy Bobgy closed this as completed Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend area/engprod lifecycle/stale The issue / pull request is stale, any activities remove this label. priority/p1
Projects
None yet
Development

No branches or pull requests

3 participants