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

Articles publishing too early #281

Closed
sftim opened this issue Jan 7, 2022 · 19 comments
Closed

Articles publishing too early #281

sftim opened this issue Jan 7, 2022 · 19 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@sftim
Copy link
Contributor

sftim commented Jan 7, 2022

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-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 7, 2022
@k8s-triage-robot
Copy link

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 7, 2022
@k8s-triage-robot
Copy link

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 7, 2022
@jberkus
Copy link
Contributor

jberkus commented May 9, 2022

/remove-lifecycle rotten

This is still a bug

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label May 9, 2022
@CIPHERTron
Copy link
Member

/assign

@chris-short
Copy link
Contributor

chris-short commented Jul 15, 2022

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
Copy link
Member

mrbobbytables commented Jul 15, 2022

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
Copy link
Contributor Author

sftim commented Jul 15, 2022

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

@imnmo
Copy link
Contributor

imnmo commented Jul 29, 2022

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

@chris-short
Copy link
Contributor

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
Copy link
Contributor

imnmo commented Aug 9, 2022

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:

  • Disable the --build future flag in the production-build stage in the makefile &
  • Enable the PublishDate option for any later dated posts - needs support to change this process in the Markdown template
  • --build future could be untouched for other stages to preview the post.

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
Copy link
Contributor Author

sftim commented Aug 12, 2022

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
Copy link
Contributor Author

sftim commented Aug 25, 2022

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

@imnmo
Copy link
Contributor

imnmo commented Aug 26, 2022

@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
Copy link
Contributor

imnmo commented Sep 1, 2022

/assign

@imnmo
Copy link
Contributor

imnmo commented Sep 2, 2022

/close

@k8s-ci-robot
Copy link
Contributor

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

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@imnmo
Copy link
Contributor

imnmo commented Sep 2, 2022

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

@sftim
Copy link
Contributor Author

sftim commented Sep 2, 2022

/close

@k8s-ci-robot
Copy link
Contributor

@sftim: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

8 participants