kata-containers / .github Goto Github PK
View Code? Open in Web Editor NEWKata Containers default files for GitHub repositories
License: Apache License 2.0
Kata Containers default files for GitHub repositories
License: Apache License 2.0
The commands that lookup issues for a PR or PRs for an issue in the hub-util.sh
script are not reliable. This appears to be due to bugs in the GitHub API. However, the list-issues-for-pr
command can be fixed to make it reliable (albeit in rather a hacky way). However, this needs to be done to allow the GitHub actions on kata-containers/kata-containers#512 to work.
The "child" PRs associated with kata-containers/kata-containers#634 added a GitHub action to each repo to enforce the porting policy. They did this by embedding the policy as a script in a GitHub workflow YAML file. This suffers from two major problems:
Maintenance:
It's a pita to update all the scripts in each repo when a policy change is required.
Reliability:
GitHub workflow files need to live in the repo they run on: they cannot live in the "magic" .github/
org-level repo to apply to all repos, as is the case for issue templates for example. This causes problems when someone opens a new PR using an old clone of a repo (or re-opens an unmerged PR) because their branch will not contain the current HEAD
commit. This means their PRs will be using older versions of the actions (OMG what?!? ) Yep. Not a great design, atleast for our workflow.
To counter this, we need to create a central script in this repo and then update all the repo-specific workflow files to call it. That way, PRs will always be using the latest version, and hence the latest policy version.
The kata-hub.sh
script incorrectly handles linked issues and PRs currently: the results are wrong ;(
Add a link to the Kata Containers survey to all the issue templates:
Sigh. The "Fixes" comment is supposed to specify an issue number with a leading "#" (such as Fixes: #123
). However, we have already merged PR without the #
. This breaks the hub util list-issues-for-pr
command.
The hub-util.sh
script currently assumes a fixes comment includes a colon (for example, "Fixes: #1
"), but it shouldn't as the colon is optional.
2022-12-20 11:10:33 ERROR juju.worker.uniter.operation runhook.go:140 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2022-12-20 11:10:33 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:12:51 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:15:33 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:15:34 INFO unit.kata/0.juju-log server.go:316 Reactive main running for hook install
2022-12-20 11:15:34 INFO unit.kata/0.juju-log server.go:316 Invoking reactive handler: reactive/kata.py:42:install_kata
2022-12-20 11:15:35 INFO unit.kata/0.juju-log server.go:316 status-set: maintenance: Installing Kata via apt
2022-12-20 11:15:36 ERROR unit.kata/0.juju-log server.go:316 Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-kata-0/charm/reactive/kata.py", line 65, in install_kata
import_key(gpg_key)
File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 496, in import_key
raise GPGKeyError("ASCII armor markers missing from GPG key")
charmhelpers.fetch.GPGKeyError: ASCII armor markers missing from GPG key
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 Traceback (most recent call last):
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 File "/var/lib/juju/agents/unit-kata-0/charm/hooks/install", line 22, in <module>
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 main()
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 bus.dispatch(restricted=restricted_mode)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 _invoke(other_handlers)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 handler.invoke()
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 self._action(*args)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 File "/var/lib/juju/agents/unit-kata-0/charm/reactive/kata.py", line 65, in install_kata
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 import_key(gpg_key)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 496, in import_key
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 raise GPGKeyError("ASCII armor markers missing from GPG key")
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 charmhelpers.fetch.GPGKeyError: ASCII armor markers missing from GPG key
2022-12-20 11:15:36 ERROR juju.worker.uniter.operation runhook.go:140 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2022-12-20 11:15:36 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:18:12 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
I tried to deploy kata on charmed kubernetes following https://juju.is/tutorials/charmed-kubernetes-kata-containers#3-deploy-the-kata-containers-extension
$ juju deploy cs:~containers/kata
Located charm "kata" in charm-store, revision 160
Deploying "kata" from charm-store charm "kata", revision 160 in channel stable on focal
$ juju add-relation kata kubernetes-control-plane
$ juju add-relation kata kubernetes-worker
$ juju add-relation kata:untrusted containerd:untrusted
status
$ watch juju status
Every 2.0s: juju status controller1: Tue Dec 20 11:20:32 2022
Model Controller Cloud/Region Version SLA Timestamp
k8s openstack-cloud openstack-cloud/RegionOne 2.9.37 unsupported 11:20:33Z
App Version Status Scale Charm Channel Rev Exposed Message
calico active 2 calico stable 54 no Calico is active
containerd go1.13.8 active 2 containerd stable 41 no Container runtime available
easyrsa 3.0.1 active 1 easyrsa stable 26 no Certificate Authority connected.
etcd 3.4.5 active 2 etcd stable 718 no Healthy with 2 known peers
kata error 2 kata stable 160 no hook failed: "install"
kubeapi-load-balancer 1.18.0 active 1 kubeapi-load-balancer stable 42 yes Loadbalancer ready.
kubernetes-control-plane 1.25.5 active 1 kubernetes-control-plane stable 204 no Kubernetes control-plane running.
kubernetes-worker 1.25.5 active 1 kubernetes-worker stable 70 yes Kubernetes worker running.
openstack-integrator xena active 1 openstack-integrator stable 45 no Ready
Unit Workload Agent Machine Public address Ports Message
easyrsa/0* active idle 0 192.168.122.56 Certificate Authority connected.
etcd/0* active idle 1 192.168.122.92 2379/tcp Healthy with 2 known peers
etcd/1 active idle 2 192.168.122.86 2379/tcp Healthy with 2 known peers
kubeapi-load-balancer/0* active idle 4 192.168.122.84 443/tcp,6443/tcp Loadbalancer ready.
kubernetes-control-plane/0* active idle 5 192.168.122.68 6443/tcp Kubernetes control-plane running.
calico/1* active idle 192.168.122.68 Calico is active
containerd/1* active idle 192.168.122.68 Container runtime available
kata/0* error idle 192.168.122.68 hook failed: "install"
kubernetes-worker/0* active idle 7 192.168.122.83 80/tcp,443/tcp Kubernetes worker running.
calico/2 active idle 192.168.122.83 Calico is active
containerd/2 active idle 192.168.122.83 Container runtime available
kata/1 error idle 192.168.122.83 hook failed: "install"
openstack-integrator/0* active idle 10 192.168.122.97 Ready
Machine State Address Inst id Series AZ Message
0 started 192.168.122.56 e13424db-b0ad-4c4f-bd8d-7f129705b331 focal nova ACTIVE
1 started 192.168.122.92 98196a15-f345-4e17-b329-6f640410881f focal nova ACTIVE
2 started 192.168.122.86 7d691ec0-a43e-419f-939e-02a9f48465cc focal nova ACTIVE
4 started 192.168.122.84 b0007809-8508-4e63-b277-5168e70d1335 focal nova ACTIVE
5 started 192.168.122.68 77f6cdde-0f4f-4c5f-827f-f3beb3f2c2e1 focal nova ACTIVE
7 started 192.168.122.83 de383db9-cb45-4d2f-8c1b-ce4f430af19a focal nova ACTIVE
10 started 192.168.122.97 a79e5a07-0e00-4fda-a140-5a02257c585b focal nova ACTIVE
Install with no issues
Errors on install
kata error 2 kata stable 160 no hook failed: "install"
I am using charmed Kubernetes on canonical OpenStack yoga version, bare metal.
I check the result of /var/lib/juju/agents/unit-kata-0/charm/reactive/kata.py
gpg_key = requests.get(
'http://download.opensuse.org/repositories/home:/katacontainers:/'
'releases:/{}:/master/x{}/Release.key'.format(arch, release)).text
and its seems empty https://download.opensuse.org/repositories/home:/katacontainers:/releases:/x86_64:/master/
Some users only want to ask questions about Kata Containers, now there is no suitable template for this type of issue. Though they can create a blank issue without a template, if there is a question template, can make users create the issue more relaxed.
Especially for users who don't use IRC.
Create a script to add a label to a PR based on its size.
The GitHub API to query labels in the PR porting checker script is only returning the first set of matches.
The script added on #10 assumes GOPATH
is set, but it may not be.
We need an easy way to add a comment to a GH issue, so add a new add-issue-comment
command to hub-util.sh
.
The https://github.com/orgs/kata-containers/projects/23 board has a In Progress
column, which is not being automatically updated when the issues are closed. This leaves the watcher with the (mistakenly) impression that we currently have hundreds of issues being worked on, while we only have a dozen of those.
There's the need to correctly reflect what we're working on in order to understand and prioritize better what we will want to work on in the future.
This was raised as part of the backlog scrub meeting.
#40 has a syntax error which is causing the GHA to fail for all PRs.
I think it'd be helpful to have a label along the lines of flakey-test to help identify problematic tests, and also PRs which are suffering from test flakes, perhaps?
Similarly, i'm lazy, and having a label area/kata-deploy would be nice too?
WDYT?
Most users who raise a bug type issue on Kata fail to read to the end of the existing bug template which tells them to run the kata-collect-data.sh
script.
Make this more prominent to save users and us time as having the output of this script makes a big difference to how quickly we can understand, and then fix an issue.
Working on auto-backporting in kata-container/kata-containers, I'm trying to check if an issue has a bug label before adding a auto-backport label to the PR.
It looks like the simplest way to do this would be to expand on the functionality of hub-utils.
The hub
tool does not provide access to GitHub projects. However, it does allow arbitrary GitHub API calls to be made, so create a script that allows projects to be manipulated on the CLI.
Add a check to the pr-porting-checks.sh
script to ignore release PRs which are defined as those PRs that:
release
subsystem.Currently PRs going to kata-containers/kata-containers
repo or to the main
branch o the kata-containers/tests
repo require forward_port labels. However, they shouldn't as those are already the "main" development branches.
GitHub has atlast grown the ability to show a README for an organisation. For an example, compare:
Description | Link | Notes |
---|---|---|
Kata org page | https://github.com/kata-containers | Just a bunch of repo links |
Confidential Containers org page | https://github.com/confidential-containers | Informative README! |
We need a welcoming README too ๐
Which feature do you think can be improved?
Our bug template should suggest adding in Kata environment info?
How can it be improved?
Usually when folks end up adding it, it is about 100000 lines of noise.
I really like how Alex pasted it for this issue:
kata-containers/runtime#1758
So, if we are to add it, I would recommend adding the formatting.
Even further, it may be useful to break down the kata-env results to include this .md formatting for us by 'section'
Additional Information
The porting checker script should ignore PRs that are not ready (wip
, etc).
There is no Han Solo mugshot in this repo.
I expected a mugshot of Han Solo here.
No mugshot.
For the auto-backport PR, it was mentioned that the autobackport
label should not be added if "no-backport-needed" is there. To do this I needed to add another function to help with this to hub-utils
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.