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

Upgrade Docsy #3382

Closed
wants to merge 14 commits into from
Closed

Upgrade Docsy #3382

wants to merge 14 commits into from

Conversation

Kalaiselvi84
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking
/kind bug

/kind cleanup

/kind documentation
/kind feature
/kind hotfix
/kind release

What this PR does / Why we need it:

Which issue(s) this PR fixes:

Closes #

Special notes for your reviewer:

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Kalaiselvi84
Once this PR has been reviewed and has the lgtm label, please assign roberthbailey for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Kalaiselvi84 Kalaiselvi84 requested review from markmandel and removed request for cyriltovena and EricFortin September 15, 2023 16:59
@github-actions github-actions bot added the kind/cleanup Refactoring code, fixing up documentation, etc label Sep 15, 2023
@Kalaiselvi84
Copy link
Contributor Author

@markmandel
I've tried three ways to upgrade Docsy,

  1. Copied latest version of Docsy to site/themes, but I encountered a rendering issue - https://gist.github.com/Kalaiselvi84/86cbb64e00aa4bf3657817a09bf9867b
  2. Error received when followed the migrating to Hugo modules approach - https://gist.github.com/Kalaiselvi84/69383165776fc8d7cd450cbc770f6853
  3. Successfully updated Docsy using Hugo modules, and now the site-server, site-static, hugo server, and hugo-test targets are passing.

Could you please share your thoughts?

@markmandel
Copy link
Member

Let's see what the preview looks like!

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6d614fcf-28b4-4661-9233-d128a53475d6

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3382/head:pr_3382 && git checkout pr_3382
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.35.0-dev-f56d6c9-amd64

@markmandel
Copy link
Member

With this approach - did you attempt to resolve the issues within the .md files? If so, where did you end up?

@google-oss-prow google-oss-prow bot added size/S and removed size/XS labels Sep 15, 2023
@Kalaiselvi84
Copy link
Contributor Author

Kalaiselvi84 commented Sep 15, 2023

Followed all the Migrate to hugo modules instructions except this command hugo mod init github.com/me-at-github/my-existing-site. To resolve the below error, deleted the vendor folder from the site directory

go: can't compute 'all' using the vendor directory
	(Use -mod=mod or -mod=readonly to bypass.)
Error: failed to load modules: failed to list modules: failed to execute 'go [list -m -json all]': failed to execute binary "go" with args [list -m -json all]: go: can't compute 'all' using the vendor directory
	(Use -mod=mod or -mod=readonly to bypass.)
 *errors.errorString

All the targets passed successfully, after resolving the error. However, the Agones site's front page doesn't appear as expected,
https://screenshot.googleplex.com/3bQFi6d4JsugDgX

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Seems like some CSS changes in our custom landing page.

How's you CSS? 😃

@@ -3,3 +3,5 @@ module github.com/agones/agones/site
go 1.20
Copy link
Member

Choose a reason for hiding this comment

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

Apache header please.

@@ -17,7 +17,7 @@ title = "Agones"
enableRobotsTXT = true

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["docsy"]
theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"]
Copy link
Member

Choose a reason for hiding this comment

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

Should we delete the layouts/docsy folder as well?

@@ -30,7 +30,7 @@ List of items to do for upgrading to {version_1} {version_2} {version_3}
- [ ] Regenerate Kubernetes resource includes (e.g. ObjectMeta, PodTemplateSpec)
- [ ] Start a cluster with `make gcloud-test-cluster` (this cluster will use Kubernetes {version_2}), uninstall agones using `helm uninstall agones -n agones-system`, and then run `make gen-embedded-openapi` and `make gen-install`
- [ ] Update documentation for creating clusters and k8s API references to align with the above clusters versions and the k8s API version
- [ ] `site/config.toml`
- [ ] `site/hugo.toml`
Copy link
Member

Choose a reason for hiding this comment

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

Is this value in the hugo.toml? Looks like it's still in config.toml?

@google-oss-prow google-oss-prow bot added size/XXL and removed size/S labels Sep 15, 2023
@Kalaiselvi84
Copy link
Contributor Author

Seems like some CSS changes in our custom landing page.

How's you CSS? 😃

Please let me know the required changes. Will do it🙂

@markmandel
Copy link
Member

Sounds good - will check out the preview and see what the differences are!

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1b9c72e8-0a15-4871-b9e3-eb4c20aa6e89

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 937c2611-38d2-4d6e-b66c-d5af5fd1c66c

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel
Copy link
Member

That's a weird one:

	helm upgrade --install --atomic --wait --namespace=agones-system \
	--create-namespace \
	--set agones.image.tag=1.35.0-dev-8c189bb,agones.image.registry="us-docker.pkg.dev/agones-images/ci" \
	--set agones.image.controller.pullPolicy="Always",agones.image.controller.pullSecret= \
	--set agones.image.extensions.pullPolicy="Always",agones.image.allocator.pullPolicy="Always" \
	--set agones.image.ping.pullPolicy="Always",agones.image.sdk.alwaysPull=true \
	--set agones.ping.http.serviceType="LoadBalancer",agones.ping.udp.serviceType="LoadBalancer" \
	--set agones.allocator.service.serviceType="LoadBalancer" \
	--set agones.controller.logLevel="debug" \
	--set agones.crds.cleanupOnDelete=true \
	--set agones.featureGates="PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=false&PodHostname=false&SplitControllerAndExtensions=false&FleetAllocationOverflow=true&CountsAndLists=true&Example=true" \
	--set agones.allocator.service.loadBalancerIP=34.139.170.120 \
	--set agones.metrics.serviceMonitor.enabled=false \
	 \
	agones /go/src/agones.dev/agones/install/helm/agones/
Release "agones" does not exist. Installing it now.
Error: release agones failed, and has been uninstalled due to atomic being set: services "agones-allocator" not found

Not seen that before as a flake. Happened on generic-1.27

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ae51576a-9b9b-4504-b9ae-d6c38098840d

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3382/head:pr_3382 && git checkout pr_3382
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.35.0-dev-309d7b9-amd64

@markmandel
Copy link
Member

This is getting really close!

@Kalaiselvi84
Copy link
Contributor Author

The current change looks good in the smaller screen. However, if we increase the gap between the tools, the bigger screen will look good, but the smaller screen will look messy. Share your thoughts please..

@Kalaiselvi84
Copy link
Contributor Author

Are we planning to keep the docsy folder to avoid the issue in the release process?

@markmandel
Copy link
Member

Are we planning to keep the docsy folder to avoid the issue in the release process?

I'm not convinced that was the issue specifically.

I'd still like to keep the docsy folder as it allows us to make patches to docsy without having to first get them pushed upstream.

@google-oss-prow google-oss-prow bot added size/M and removed size/XXL labels Sep 29, 2023
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 4594ea63-ed8f-4a4f-841e-b89063dd1d16

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3382/head:pr_3382 && git checkout pr_3382
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.35.0-dev-c28c58b-amd64

@markmandel
Copy link
Member

Are we planning to keep the docsy folder to avoid the issue in the release process?

Sorry I should have asked a clarifying question: In this PR we using the theme site/themes/docsy - I just saw it go back in, so I'm assuming that we aren't? And we're integrating it another way?

It looks like we migrated to using Hugo modules? If that's the case, then yeah - delete the docsy folder if we're not using it anymore. Sorry, I should have asked that first.

@Kalaiselvi84
Copy link
Contributor Author

It looks like we migrated to using Hugo modules? If that's the case, then yeah - delete the docsy folder if we're not using it anymore.

Yes, migrated to Hugo modules: https://www.docsy.dev/docs/updating/convert-site-to-module/. However, the site-static target requires the agones/site/themes/docsy/assets/vendor/Font-Awesome/scss folder. Is it good to keep the docsy folder?

@markmandel
Copy link
Member

However, the site-static target requires the agones/site/themes/docsy/assets/vendor/Font-Awesome/scss folder

Why does it need it? Seems like it shouldn't be required anymore?

@Kalaiselvi84
Copy link
Contributor Author

Why does it need it? Seems like it shouldn't be required anymore?

Will delete it. This is not necessary as we are initially cleaning up the working directory in build script?

@markmandel
Copy link
Member

Will delete it. This is not necessary as we are initially cleaning up the working directory in build script?

Well if we're not using that folder for anything for generating the website, then we don't need the folder 👍🏻

The build script doesn't affect any of this - the updated version uses whatever is latest from main as the code to run. So if the tool runs on Ci and local, it will work there.

@google-oss-prow google-oss-prow bot added size/XXL and removed size/M labels Oct 3, 2023
@Kalaiselvi84
Copy link
Contributor Author

I've attempted various alignment methods for the Agones title, description, and asciinema-player on the landing page. While the alignment appears satisfactory on a laptop screen, it doesn't translate as well to larger screens.

For reference, here are the different alignment methods I've tried with @media: https://gist.github.com/Kalaiselvi84/3bde60bf8158b9100508095c8f0c3ab7

Based on the latest preview available at https://c28c58b-dot-preview-dot-agones-images.appspot.com/, the alignment seems acceptable on both screens.

Should we proceed with this current configuration? WDYT?

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: e86f756c-9e64-40d1-aa95-a34100dc2fd9

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3382/head:pr_3382 && git checkout pr_3382
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.36.0-dev-f1699b2-amd64

@markmandel
Copy link
Member

Should we proceed with this current configuration? WDYT?

I think I might need to download this and see what playing around with the CSS rules will do 😃

A couple of things of note if you have some good ideas on (and so I don't forget), and are probably the biggest issues I see:

In the header

image

The "AGONES" should be bold. This is what the current website looks like:

image

Should be a case of setting the font weight appropriately.

Front page

That big gap between the console and the "Host, Run and Scale dedicated game servers on Kubernetes"

image

There are some other layout differences, but nothing I think we need to be huge blockers on.

Only other thought - the Community Page (preview) seems to have the wide layout. We could check the source code there to see how they are doing that (if we want to go wide that is).

@Kalaiselvi84
Copy link
Contributor Author

Kalaiselvi84 commented Oct 5, 2023

I believe I might be overlooking a detail. I attempted to use the command hugo mod init github.com/me-at-github/my-existing-site. Specifically, I tried variations such as hugo mod init github.com/googleforgames/agones/tree/main/site and hugo mod init github.com/kalaiselvi84/agones/tree/main/site. Reference-https://www.docsy.dev/docs/updating/convert-site-to-module/

However, I received the following error:

go: /usr/local/google/home/kalaiselvim/Desktop/agones/site/go.mod already exists
Error: failed to init modules: failed to execute 'go [mod init github.com/kalaiselvi84/agones/tree/main/site]': failed to execute binary "go" with args [mod init github.com/kalaiselvi84/agones/tree/main/site]: go: /usr/local/google/home/kalaiselvim/Desktop/agones/site/go.mod already exists
 *errors.errorString

I've ignored this error because the error message indicates that go.mod already exists. I am unsure if this could be a problem?

@markmandel
Copy link
Member

I believe I might be overlooking a detail. I attempted to use the command hugo mod init github.com/me-at-github/my-existing-site. Specifically, I tried variations such as hugo mod init github.com/googleforgames/agones/tree/main/site and hugo mod init github.com/kalaiselvi84/agones/tree/main/site. Reference-https://www.docsy.dev/docs/updating/convert-site-to-module/

Curious - why? 😃

@Kalaiselvi84
Copy link
Contributor Author

I believe I might be overlooking a detail. I attempted to use the command hugo mod init github.com/me-at-github/my-existing-site. Specifically, I tried variations such as hugo mod init github.com/googleforgames/agones/tree/main/site and hugo mod init github.com/kalaiselvi84/agones/tree/main/site. Reference-https://www.docsy.dev/docs/updating/convert-site-to-module/

Curious - why? 😃

I've corrected the error and included the appropriate go.mod and go.sum files in the latest PR. Apologies for the oversight..

@markmandel
Copy link
Member

Filed Kalaiselvi84#325 against your branch, that I believe fixes all the issues.

PTAL and let me know if you see anything missing!

@Kalaiselvi84
Copy link
Contributor Author

Closing this PR, since the task has been completed in another PR: #3417

@Kalaiselvi84 Kalaiselvi84 deleted the docsy branch March 15, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress kind/cleanup Refactoring code, fixing up documentation, etc size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants