Skip to content

Commit

Permalink
Merge pull request #329 from authzed/mvgraph
Browse files Browse the repository at this point in the history
Move `validated-update-graph.yaml` -> `config/update-graph.yaml`
  • Loading branch information
ecordell authored Jul 23, 2024
2 parents e9698af + 0d20698 commit 435f192
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 2,267 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
id: "verify-changed-graph"
with:
files: |
validated-update-graph.yaml
config/update-graph.yaml
- name: "Commit validated update graph"
uses: "EndBug/add-and-commit@v9"
if: |
Expand Down
1 change: 0 additions & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
ignore: |
config/
proposed-update-graph.yaml
validated-update-graph.yaml
e2e/
examples
pkg/crds
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Continuous integration enforces that `go mod tidy` has been run.
### Regenerating `proposed-update-graph.yaml`

The update graph can be regenerated whenever there is a new spicedb release.
CI will validate all new edges when there are changes to `proposed-update-graph.yaml` and will copy them into `validated-update-graph.yaml` if successful.
CI will validate all new edges when there are changes to `proposed-update-graph.yaml` and will copy them into `config/update-graph.yaml` if successful.

```go
mage gen:graph
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g

FROM cgr.dev/chainguard/static:latest

COPY --from=builder /go/src/app/validated-update-graph.yaml /opt/operator/config.yaml
COPY --from=builder /go/src/app/spicedb-operator /usr/local/bin/spicedb-operator
ENTRYPOINT ["spicedb-operator"]
1 change: 0 additions & 1 deletion Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# vim: syntax=dockerfile
FROM cgr.dev/chainguard/static:latest
COPY validated-update-graph.yaml /opt/operator/config.yaml
COPY --from=ghcr.io/grpc-ecosystem/grpc-health-probe:v0.4.25 /ko-app/grpc-health-probe /usr/local/bin/grpc_health_probe
COPY spicedb-operator /usr/local/bin/spicedb-operator
ENTRYPOINT ["spicedb-operator"]
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var (
archives = strings.FieldsFunc(os.Getenv("ARCHIVES"), listsep)
images = strings.FieldsFunc(os.Getenv("IMAGES"), listsep)
ProposedGraphFile = stringz.DefaultEmpty(os.Getenv("PROPOSED_GRAPH_FILE"), "../proposed-update-graph.yaml")
ValidatedGraphFile = stringz.DefaultEmpty(os.Getenv("VALIDATED_GRAPH_FILE"), "../validated-update-graph.yaml")
ValidatedGraphFile = stringz.DefaultEmpty(os.Getenv("VALIDATED_GRAPH_FILE"), "../config/update-graph.yaml")
graphExtraConfig = strings.FieldsFunc(os.Getenv("GRAPH_EXTRA_CONFIG"), listsep)

restConfig *rest.Config
Expand Down
2 changes: 1 addition & 1 deletion magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (Test) Unit() error {

const (
DefaultProposedGraphFile = "proposed-update-graph.yaml"
DefaultValidatedGraphFile = "validated-update-graph.yaml"
DefaultValidatedGraphFile = "config/update-graph.yaml"
)

// Runs the end-to-end tests in a kind cluster
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ func GetConfig(fileName string) (cfg OperatorConfig) {

func TestGraphDiffSanity(t *testing.T) {
proposedGraph := GetConfig("../../proposed-update-graph.yaml")
validatedGraph := GetConfig("../../validated-update-graph.yaml")
validatedGraph := GetConfig("../../config/update-graph.yaml")
require.NotPanics(t, func() {
_ = proposedGraph.UpdateGraph.Difference(&validatedGraph.UpdateGraph)
})
Expand Down
Loading

0 comments on commit 435f192

Please sign in to comment.