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

Add owners in interface.yaml #19

Merged
merged 5 commits into from
Aug 9, 2024
Merged

Conversation

IronCore864
Copy link
Collaborator

@IronCore864 IronCore864 commented Aug 5, 2024

Background:

We would like to run the charm-relation-interfaces tests on a schedule using a GitHub Actions cron job, and if a certain interface test failed, we'd like to automatically create an issue and assign it to the owner (if specified).

This PR adds support to define the owners field (a list of GitHub user IDs) in interface.yaml. Example:

name: prometheus_scrape

version: 0
status: published

providers:
  - name: prometheus-k8s
    url: https://www.github.com/canonical/prometheus-k8s-operator

requirers:
  - name: prometheus-k8s
    url: https://www.github.com/canonical/prometheus-k8s-operator

owners:
  - ironcore864
  - foo
  - bar

@PietroPasotti
Copy link
Collaborator

I'd expect in most cases the owner of the interface to be the owner of the charm lib that implements the wrapper for the provider side.
So, owner of the interface tests = owner of the provider charm.

Also at least in our case that'd be a team, is that also a supported use case?

@IronCore864
Copy link
Collaborator Author

I'd expect in most cases the owner of the interface to be the owner of the charm lib that implements the wrapper for the provider side. So, owner of the interface tests = owner of the provider charm.

Also at least in our case that'd be a team, is that also a supported use case?

Hi @PietroPasotti, today we had a discussion in our team's standup, and here's our discovery and some initial conclusion:

  • Assigning an issue to a team is not possible, it can only be assigned to members.
  • If we don't add the owner it's not easy to find the owner's GitHub ID. It's not in the charm, and it's possible for an interface to have multiple charms testing it.
  • We considered adding interface-owner mapping in CODEOWNERS in the charm-relation-interfaces repo, but it's not as convenient as managing this distributedly because we can add it in the template.

As a conclusion, here's what we want to do:

  • Don't use CODEOWNERS, but still maintain interface-owner mapping in the interface.yaml file.
  • Instead of assigning an issue to a single owner, we want to make it a list, I.E., owners, so that multiple users can be assigned simultaneously.

I will make the changes accordingly.

@IronCore864 IronCore864 changed the title Add owner in interface.yaml Add owners in interface.yaml Aug 8, 2024
@IronCore864
Copy link
Collaborator Author

@PietroPasotti I have changed it to owners, a list, according to the previous discussion. Please take a look.

Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit, the rest LGTM

interface_tester/collector.py Show resolved Hide resolved
@IronCore864
Copy link
Collaborator Author

One minor nit, the rest LGTM

Fixed, and also bumped the version to v3.1.0.

@PietroPasotti PietroPasotti merged commit 983fc62 into canonical:main Aug 9, 2024
2 checks passed
@IronCore864 IronCore864 deleted the add-owner branch August 12, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants