akash-network / website-5-archive

This repository is no longer under active maintenance. Please follow the new repository at https://github.com/akash-network/website-revamp for updates.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pull Issue between Github Community Repos and Akash Website

brewsterdrinkwater opened this issue · comments

Description

The Akash website community groups side menu is not pulling data properly from the Github community groups. Many of the pages on the website are pulling old information or 404 errors.

Steps to reproduce

Link works properly on Github - https://github.com/akash-network/community/blob/main/sig-clients/meetings/001-2023-01-19.md
Links for meeting notes are retrieving "404" error via website -https://akash.network/community/core-groups/sig-clients/meetings/001-2023-01-19

Desired Outcome:

The fix would be to pull the information from Github in real time to the website, so as changes are made to Github community repos, those changes show up on the website quickly.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue was closed because it has been stalled for 5 days with no activity.

This issue was closed because it has been stalled for 5 days with no activity.

Finally got to check this.

Looking:

  1. Greg's commit to update the Akash Network Community Groups (CGs) page page failed
    image

  2. Clicking on ❌ shows the Cloudflare bit failed
    image

  3. Details leading to the GH Actions page with the failed Cloudflare Pages build job.
    image

  4. View logs leads to the logs page at Cloudflare

image

image

Logs:

2023-06-03T00:39:22.062267Z	Cloning repository...
2023-06-03T00:39:31.069022Z	From https://github.com/akash-network/website
2023-06-03T00:39:31.069666Z	 * branch            e825c83057cf1d959eab6c6950fecfb6d50893c5 -> FETCH_HEAD
2023-06-03T00:39:31.070366Z	
2023-06-03T00:39:32.939425Z	HEAD is now at e825c83 community: fix links
2023-06-03T00:39:32.940258Z	
2023-06-03T00:39:34.109591Z	Submodule 'stage/community' (https://github.com/akash-network/community.git) registered for path 'stage/community'
2023-06-03T00:39:34.110341Z	Cloning into '/opt/buildhome/clone/stage/community'...
2023-06-03T00:39:34.110527Z	Submodule path 'stage/community': checked out '0d2fa3bdf67e4016a17d0b377bb196275a21b6f5'
2023-06-03T00:39:34.110655Z	
2023-06-03T00:39:34.146661Z	Success: Finished cloning repository files
2023-06-03T00:39:34.786478Z	Installing dependencies
2023-06-03T00:39:34.794798Z	Python version set to 2.7
2023-06-03T00:39:37.805064Z	v12.18.0 is already installed.
2023-06-03T00:39:38.883783Z	Now using node v12.18.0 (npm v6.14.4)
2023-06-03T00:39:39.058405Z	Started restoring cached build plugins
2023-06-03T00:39:39.070452Z	Finished restoring cached build plugins
2023-06-03T00:39:39.465852Z	Attempting ruby version 2.7.1, read from environment
2023-06-03T00:39:40.876693Z	Using /opt/buildhome/.rvm/gems/ruby-2.7.1
2023-06-03T00:39:41.817819Z	Using PHP version 5.6
2023-06-03T00:39:41.909048Z	5.2.5 is already installed.
2023-06-03T00:39:41.925806Z	Using Swift version 5.2.5
2023-06-03T00:39:41.926266Z	Started restoring cached node modules
2023-06-03T00:39:41.937328Z	Finished restoring cached node modules
2023-06-03T00:39:42.260116Z	Installing NPM modules using NPM version 6.14.4
2023-06-03T00:39:44.005582Z	npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
2023-06-03T00:39:55.621633Z	
2023-06-03T00:39:55.622513Z	> akash-network-website@1.1.0 postinstall /opt/buildhome/repo
2023-06-03T00:39:55.622701Z	> hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo
2023-06-03T00:39:55.622842Z	
2023-06-03T00:39:55.711382Z	(node:1184) ExperimentalWarning: The ESM module loader is experimental.
2023-06-03T00:39:55.72907Z	internal/modules/run_main.js:54
2023-06-03T00:39:55.729358Z	    internalBinding('errors').triggerUncaughtException(
2023-06-03T00:39:55.729524Z	                              ^
2023-06-03T00:39:55.729648Z	
2023-06-03T00:39:55.729771Z	Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader
2023-06-03T00:39:55.729895Z	    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:720:11)
2023-06-03T00:39:55.730017Z	    at Loader.resolve (internal/modules/esm/loader.js:97:40)
2023-06-03T00:39:55.730133Z	    at Loader.getModuleJob (internal/modules/esm/loader.js:243:28)
2023-06-03T00:39:55.730252Z	    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:42:40)
2023-06-03T00:39:55.730381Z	    at link (internal/modules/esm/module_job.js:41:36) {
2023-06-03T00:39:55.73049Z	  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
2023-06-03T00:39:55.730597Z	}
2023-06-03T00:39:55.747667Z	npm ERR! code ELIFECYCLE
2023-06-03T00:39:55.74791Z	npm ERR! errno 1
2023-06-03T00:39:55.748886Z	npm ERR! akash-network-website@1.1.0 postinstall: `hugo-installer --version otherDependencies.hugo --extended --destination node_modules/.bin/hugo`
2023-06-03T00:39:55.749189Z	npm ERR! Exit status 1
2023-06-03T00:39:55.749399Z	npm ERR! 
2023-06-03T00:39:55.749555Z	npm ERR! Failed at the akash-network-website@1.1.0 postinstall script.
2023-06-03T00:39:55.749729Z	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-06-03T00:39:55.794768Z	
2023-06-03T00:39:55.795059Z	npm ERR! A complete log of this run can be found in:
2023-06-03T00:39:55.795247Z	npm ERR!     /opt/buildhome/.npm/_logs/2023-06-03T00_39_55_783Z-debug.log
2023-06-03T00:39:55.810412Z	Error during NPM install
2023-06-03T00:39:55.814596Z	Failed: build command exited with code: 1
2023-06-03T00:39:56.578554Z	Failed: error occurred while running build command
  1. I clicked the Re-run button there
    image

Doesn't seem to be doing anything 🤷‍♂️

  1. Could also click Retry deployment in Cloudflare for that job

image

But thought that it was an old one, which might have been even failing for a reason.

Next steps

Checking whether the automation is generally working by merging couple of fixes in this PR akash-network/website#235

Observations so far

  1. Merged the PRs (#235, #236 and the final one - #237)
  2. It triggered the build job automatically (e.g. for the PR #237 ) https://github.com/akash-network/website/actions/runs/6002416404/ )
  3. The build job takes less than 5 minutes
  4. Only the first fix was reflected at the Akash Website => the link to sig-economics page:

image

  • Page not found :( - The page you are looking for doesn't exist or has been moved.

image

The other two attempts #236 #237 to fix the link to Stable payments & Settlement - failed.

  1. Purging Cloudflare cache doesn't help

Thoughts

Maybe the page is too nested?

Tested the nesting issue theory:
akash-network/website#238

And it confirms!

https://akash.network/community/core-groups/stable-payments-and-take-rate/ - Works! 🥳

image

https://akash.network/community/core-groups/sig-economics/stable-payments-and-take-rate/ - Does not - Page not found :(

image

Looks like we can't nest the pages too much, max depth is 3 levels as it seems.

website/
content/
en/
community/core-groups/sig-economics

Anything that goes deeper than that, e.g. <1>/<2>/<3>/<4> - <4> will return 404 Page not found

There might be some particular setting for that in Hugo, but I have not seen them to be showing deeper than 3 levels in their docs https://gohugo.io/content-management/sections/?search-input=levels

Ok that was not the nesting limit, but the way how Hugo works 🤣

You need to rename the index.md pages to _index.md if you want it to have child pages. This tells Hugo that it is a section / list page.

Source: https://discourse.gohugo.io/t/pages-in-nested-content-directory-vanish-completely/24915

PR akash-network/website#239

Et voilà!

image

The fix is to just rename all index.md to _index.md under the website/content/en/community/core-groups/*/ (and wherever applicable) for them to have an access to the child pages.

Automation is working.

Closing.