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

Upload release notes JSON (relnotes.k8s.io) to a Google Cloud Bucket #1087

Closed
saschagrunert opened this issue Feb 11, 2020 · 27 comments · Fixed by kubernetes/sig-release#2342
Assignees
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject kind/feature Categorizes issue or PR as related to a new feature. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/release Categorizes an issue or PR as relevant to SIG Release.

Comments

@saschagrunert
Copy link
Member

saschagrunert commented Feb 11, 2020

What would you like to be added:

We currently vendor the JSON based release notes for relnotes.k8s.io into the repository:
https://github.com/kubernetes-sigs/release-notes/tree/master/src/assets

We could put these assets on a Google Cloud Storage Bucket to give the Release Notes Team a faster way to update the data as well as avoid having the need for an additional PR on update.

Why is this needed:

It's not necessarily needed, but would improve the workflow around the notes and reduce the complexity.

/cc @cartyc @JamesLaverack @justaugustus

@saschagrunert saschagrunert added kind/feature Categorizes issue or PR as related to a new feature. sig/release Categorizes an issue or PR as relevant to SIG Release. area/release-eng Issues or PRs related to the Release Engineering subproject labels Feb 11, 2020
@justaugustus
Copy link
Member

/assign
/priority important-soon

I need to noodle on this a little, since it will involve granting more people access to GCP...

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority labels Feb 11, 2020
@justaugustus justaugustus added this to Backlog in Release Team via automation Feb 11, 2020
@justaugustus justaugustus moved this from Backlog to To do in Release Team Feb 11, 2020
@cartyc
Copy link

cartyc commented Feb 11, 2020

@justaugustus Is this something that could be delegated to a service account or would that too broad and not be granular enough?

@JamesLaverack
Copy link
Member

This affects the implementation of krel release-notes (see https://github.com/kubernetes/release/blob/master/cmd/krel/cmd/release_notes.go).

@puerco and I were thinking about the implementation, and we realised that in the existing flow we run release-notes, then run a JS based prettier for the JSON, then PR into k-sigs/release-notes. (See the role handbook for more details). We have to run the prettier (there's a build check on k-sigs/release-notes to make sure you have) and so we'd need to invoke NPM from krel to do this currently. So uploading to a bucket would probably make this easier. (We can still pretty-print the JSON, but we can do that in Go instead of invoking the NPM one).

@saschagrunert
Copy link
Member Author

This affects the implementation of krel release-notes (see https://github.com/kubernetes/release/blob/master/cmd/krel/cmd/release_notes.go).

@puerco and I were thinking about the implementation, and we realised that in the existing flow we run release-notes, then run a JS based prettier for the JSON, then PR into k-sigs/release-notes. (See the role handbook for more details). We have to run the prettier (there's a build check on k-sigs/release-notes to make sure you have) and so we'd need to invoke NPM from krel to do this currently. So uploading to a bucket would probably make this easier. (We can still pretty-print the JSON, but we can do that in Go instead of invoking the NPM one).

Sounds good to me! Sure the prettier-invocation would go away if the website fetches the sources from a remote location. 👍

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 May 14, 2020
@saschagrunert
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 14, 2020
@saschagrunert
Copy link
Member Author

I think the main issue is here which bucket we choose and how we would handle granting permissions to the bucket. At least the whole SIG Release Notes subteam and Release Engineering would have a need to access the bucket…

@saschagrunert
Copy link
Member Author

/assign @cartyc

We will start working on this soon :)

@LappleApple LappleApple moved this from High-priority to Backlog in Release Team Sep 17, 2020
@justaugustus justaugustus removed this from Backlog (high-priority at top) in Release Team Sep 21, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Nov 1, 2020
@saschagrunert
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 2, 2020
@saschagrunert
Copy link
Member Author

Hey @cartyc, do you have any update on this one?

@cartyc
Copy link

cartyc commented Nov 30, 2020

Sorry @saschagrunert I didn't get the notification for some reason. My initial test worked great I'm just stuck right now on getting my head wrapped around on typescript async. I have it so the call gets made but the difficulty I bumped into is exporting that var from assets.ts .

export const data = async () => {
  const assets = await  gapi.load('client', start);
}

There might be a better approach and my newness to typescript is showing :)

@saschagrunert
Copy link
Member Author

Working on the index file support now in #1812

@saschagrunert
Copy link
Member Author

My target is to finish the process implementation within the next days that we can start consuming the new artifacts with v1.20.0, v1.19.5, v1.18.13 and v1.17.15.

@cartyc
Copy link

cartyc commented Dec 6, 2020

Hey @saschagrunert I opened a WIP PR kubernetes-sigs/release-notes#215

@saschagrunert
Copy link
Member Author

Hey @saschagrunert I opened a WIP PR kubernetes-sigs/release-notes#215

Thank you! 🙏 I'll give it a first quick review.

@saschagrunert
Copy link
Member Author

Updating the website to consume the artifacts seems to be the final step before closing this.

@justaugustus
Copy link
Member

/unassign
/assign @saschagrunert
FYI @wilsonehusin

@ashnehete
Copy link
Contributor

It looks like the implementation on the website side as stalled due to some errors. After debugging @cartyc's PR (kubernetes-sigs/release-notes#215) it seems we could take a different approach and directly fetch release-notes-index.json using a public URL i.e. https://gcsweb.k8s.io/gcs/kubernetes-release/release/release-notes-index.json

The only blocker here seems that the above URL doesn't support CORS which is required to make AJAX calls from relnotes.k8s.io.

/assign @ashnehete

@xmudrii
Copy link
Member

xmudrii commented May 25, 2021

This is blocked by kubernetes/k8s.io#1810 (comment) until we don't move to the community GCP project.

@xmudrii
Copy link
Member

xmudrii commented May 25, 2021

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label May 25, 2021
@ashnehete
Copy link
Contributor

I just realised that cdn.dl.k8s.io is enabled for CORS which means we can fetch release assets using this URL. Moreover, using the dl.k8s.io domain seems to be where the community is moving as a whole too.

I'm currently working on a PR for this in the release notes repo.

/lifecycle active

@k8s-ci-robot k8s-ci-robot added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. and removed lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. labels Aug 7, 2023
@ashnehete
Copy link
Contributor

Now that the PR is merged and site is actively fetching notes from the remote, do we need to amend the release-notes team docs to stop them from creating a PR for each new release? Any code changes needed in the krel utility?

@saschagrunert
Copy link
Member Author

Now that the PR is merged and site is actively fetching notes from the remote, do we need to amend the release-notes team docs to stop them from creating a PR for each new release? Any code changes needed in the krel utility?

Hm I don't think so, the release notes should be now populated automatically. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject kind/feature Categorizes issue or PR as related to a new feature. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/release Categorizes an issue or PR as relevant to SIG Release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants