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

Initial implementation of syn-teams.libsonnet #1

Merged
merged 16 commits into from
Dec 20, 2024
Merged

Conversation

simu
Copy link
Member

@simu simu commented Dec 19, 2024

TODO

  • Add PR template
  • Add some linting & testing infrastructure

simu added 5 commits December 19, 2024 13:29
This variable maps team names to lists of instances. The map only
contains teams which are reponsible for at least one instance in the
cluster.

The logic raises an error if it detects any instances in the cluster
which aren't assigned to any team (after taking into account the
fallback assignment to `syn.owner`).

Usually, this can only happen if the owner team explicitly specifies
that they're not responsible for an application and no other team has
that application in their list.
This function does the lookup in the `teamApplicationMap` and falls back
to `null` if the provided team name isn't present in the map.
This function returns the list of teams (optionally including the owner
team) which are assigned to at least one application in the cluster.
This variable maps all instances in the cluster to their responsible
team.

The logic raises an error for any instances that aren't assigned to any
team (after taking into account the `syn.owner` fallback). This error
originates from `teamApplicationMap` which is used in the implementation
to render the contents for `applicationTeamMap`.

Additionally, the logic for `applicationTeamMap` also raises an error if
it detects that any instance is assigned to multiple teams.
tests/syn-teams.yaml Show resolved Hide resolved
tests/golden/syn-teams.yml Show resolved Hide resolved
.github/ISSUE_TEMPLATE/config.yml Show resolved Hide resolved
.github/workflows/release.yaml Show resolved Hide resolved
.github/workflows/release.yaml Show resolved Hide resolved
.github/workflows/release.yaml Show resolved Hide resolved
.github/workflows/release.yaml Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
.github/workflows/auto-release.yaml Show resolved Hide resolved
.github/workflows/auto-release.yaml Show resolved Hide resolved
@simu simu force-pushed the initial-implementation branch 3 times, most recently from 4ab506a to cc104b0 Compare December 20, 2024 09:47
@simu simu requested a review from a team December 20, 2024 09:50
@simu
Copy link
Member Author

simu commented Dec 20, 2024

Boilerplate is copied from component template. Testing infrastructure is adapted from commodore-compile-pipelines.

syn-teams.libsonnet Outdated Show resolved Hide resolved
syn-teams.libsonnet Outdated Show resolved Hide resolved
tests/syn-teams.jsonnet Outdated Show resolved Hide resolved
@simu simu force-pushed the initial-implementation branch from e4f6afd to 9b73f40 Compare December 20, 2024 14:56
@simu simu merged commit d37f305 into main Dec 20, 2024
4 checks passed
@simu simu deleted the initial-implementation branch December 20, 2024 15:02
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.

2 participants