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

x/pkgsite/cmd/pkgsite: (self-hosted) README.md not visible in untagged version, but visible in tagged version #64316

Open
mrngm opened this issue Nov 21, 2023 · 2 comments
Assignees
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@mrngm
Copy link

mrngm commented Nov 21, 2023

This issue describes a problem in a self-hosted pkgsite environment.

Setup

Our setup uses this commit as basis for a pkgsite frontend+worker, using Athens v0.12.1 as proxy (through the frontend's -proxy_url commandline option) for our private Gitlab repositories. Our private Gitlab repositories are regularly fetched through the proxy, and the documentation is updated. This runs well. I can elaborate on the setup if that's needed.

We noticed a discrepancy between non-tagged Go modules and tagged Go modules with regards to the README file. We use README.md for easy reading within the Gitlab web interface.

Problem description

In a repository containing a non-empty README.md with (multiple) Git tags (e.g. v1.1.4), the README.md is neatly shown inside the pkgsite frontend. However, in another repository that contains a non-empty README.md but does not have Git tags, the README.md is not shown in the pkgsite frontend.

Expected behaviour

Regardless of the presence of Git tags, a non-empty README should be visible within the pkgsite frontend.

Other information

The reported, most recent version in the untagged module is v0.0.0-20231121130704-9ad3935cf734. The reported, most recent version in the tagged module is v1.1.4. Our Gitlab settings set the develop branch as default branch. When cloning the repository, this defaults to pulling the develop branch.

In the untagged module, there exists a master branch with two commits, but the reported commit 9ad3935cf734 is not present in that branch. The master branch doesn't contain a README.md. However, if pkgsite would use the master branch, I would have expected a rather empty directory structure on the documentation page. When looking at the untagged module on the pkgsite frontend, it shows the directory structure currently present in the commit 9ad3935cf734.

The size of README.md in the tagged repository is 641 bytes. The size of README.md in the untagged repository is 1134 bytes. The MaxFileSize in internal/fetch/limit.go is 30 * megabyte, so I'm not expecting these READMEs to hit the fetch limit. Our log files from the frontend and the worker (both on log level info) do not contain words like exceeds or file size.

At this time, the pkgsite diff to master@ee1eba0daf6405765d06de9643dfe6c620ed47a8 with regards to our version doesn't seem to indicate any patches that would describe and/or solve this problem.

Referencing self-hosting tracking issue #39827 as well.

@mrngm mrngm added the pkgsite label Nov 21, 2023
@gopherbot gopherbot added this to the Unreleased milestone Nov 21, 2023
@seankhliao seankhliao changed the title x/pkgsite: (self-hosted) README.md not visible in untagged version, but visible in tagged version x/pkgsite/cmd/pkgsite: (self-hosted) README.md not visible in untagged version, but visible in tagged version Nov 21, 2023
@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 21, 2023
@hyangah
Copy link
Contributor

hyangah commented Dec 7, 2023

@mrngm Since you linked #39827, do you see different behavior (a discrepancy between non-tagged Go modules and tagged Go modules ) with pkg.go.dev too?

cc @jba

@hyangah hyangah modified the milestones: Unreleased, pkgsite/unplanned Dec 7, 2023
@jba jba self-assigned this Jan 22, 2024
@mrngm
Copy link
Author

mrngm commented Feb 5, 2024

@hyangah I cannot directly find a repository on pkg.go.dev that could show the same behaviour. If I find one, I'll update the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants