kubernetes / contributor-site

Code for kubernetes.dev
https://www.kubernetes.dev
Apache License 2.0
64 stars 153 forks source link

Articles publishing too early #281

Closed sftim closed 2 years ago

sftim commented 2 years ago

https://kubernetes.dev/blog/2022/01/10/meet-our-contributors-india-ep-01/ was intended to publish next week; however, it is already live.

I assume this is a bug.

/kind bug

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

jberkus commented 2 years ago

/remove-lifecycle rotten

This is still a bug

CIPHERTron commented 2 years ago

/assign

chris-short commented 2 years ago

According to https://github.com/kubernetes/contributor-site/blob/master/.github/workflows/netlify-periodic-build.yml runs at 3:30 UTC daily (thus the blog uses UTC time). You have to use Hugo front matter to establish the date you want to publish your article and set the time to 0330 UTC or earlier, then it should get published.

What's happening now that's outside of that current setup?

mrbobbytables commented 2 years ago

The config is set to build future, so it ignores the date and builds everything. The makefile just has to be updated to remove that flag https://github.com/kubernetes/contributor-site/blob/master/Makefile#L128

sftim commented 2 years ago

If anyone wants to work on this, I'm happy to explain in detail what the fix could look like.

imnmo commented 2 years ago

Hi @CIPHERTron , I am interested to work on this issue, can I take it?

chris-short commented 2 years ago

Yes, feel free. You don’t need permission. Make sure you follow the steps in the contributor guide to get yourself ready to commit: https://www.kubernetes.dev/docs/guide/

imnmo commented 2 years ago

Hi Folks,

I have figured out the solution.

Addressing the actual issue by @sftim with article publishing early than the intended date. My assumption is there is no such feature to schedule posts - I looked up the GH workflow as pointed by @chris-short and it runs daily and just builds them, no special job or stage to schedule posts.

The only option is to understand how Hugo handles scheduling future posts. @mrbobbytables gave the right direction to check the hugo --buildFuture - which Hugo enforces to build the future posts for the enabled PublishDate blog posts (see here: https://gohugo.io/content-management/front-matter/)

So, the solution is to:

It works. I tested locally for posts with the PublishDate (set to today+1) option for a test blog post, based on PublishDate Hugo will not publish and waits until the publishDate is today and the netlify build job runs to publish them. So this could be the option for us to schedule the post for a future date after the PR merge.

Please let me know about this solution. We can discuss this for further clarifications. Once all is good. I will provide the PR for the same.

(Thanks, @chris-short for giving hints during the weekly SIG Marketing meeting)

sftim commented 2 years ago

Thanks @imnmo

Please open that PR with a proposed fix. I'll be happy to review it (might not be the same day; sorry about that).

sftim commented 2 years ago

@imnmo, could we help you get working on a fix? It's OK to ask for help.

imnmo commented 2 years ago

@sftim unfortunately, I didn't find time past week to provide the PR. I will work on this issue today and create PR for discussions.

imnmo commented 2 years ago

/assign

imnmo commented 2 years ago

/close

k8s-ci-robot commented 2 years ago

@imnmo: You can't close an active issue/PR unless you authored it or you are a collaborator.

In response to [this](https://github.com/kubernetes/contributor-site/issues/281#issuecomment-1235193821): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
imnmo commented 2 years ago

Can anyone help me close this issue? I can't, but the PR is merged and can be closed.

sftim commented 2 years ago

/close

k8s-ci-robot commented 2 years ago

@sftim: Closing this issue.

In response to [this](https://github.com/kubernetes/contributor-site/issues/281#issuecomment-1235257822): >/close > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.