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

*: Flatten repository structure #10583

Merged
merged 11 commits into from
Feb 6, 2025
Merged

Conversation

timflannagan
Copy link
Member

Description

Implements #10566.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

   - Base layer moving all project code to internal
   - Keeps original structure intact within internal/

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Flattens API types to root level
   - Standard location for Kubernetes API types

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Consolidates all binaries under cmd/
   - Standard Go project layout for executables

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Cleanup of specific binary location
   - Part of cmd/ directory standardization

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Updates docs, configs, and other non-Go files
   - Includes GHA workflows, goreleaser config, etc.

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Updates Go imports to reflect new structure
   - Single atomic change for all import updates

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Moves codegen tooling to standard location
   - Updates paths in generation scripts

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Updates codegen scripts for new paths
   - Ensures generated code works with new structure

Signed-off-by: timflannagan <timflannagan@gmail.com>
   - Final regeneration of client code
   - Verifies all paths are correct

Signed-off-by: timflannagan <timflannagan@gmail.com>
Copy link
Contributor

@jenshu jenshu left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +12 to +13
v1 "github.com/kgateway-dev/kgateway/internal/gateway/pkg/api/v1"
gloov1 "github.com/kgateway-dev/kgateway/internal/gloo/pkg/api/v1"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: these directories don't exist and probably don't need to be updated in this PR, but i don't feel strongly since these tests don't currently get compiled and will be ripped out eventually

@@ -301,7 +301,7 @@ generated-code: fmt

.PHONY: go-generate-all
go-generate-all: ## Run all go generate directives in the repo, including codegen for protos, mockgen, and more
GO111MODULE=on go generate ./projects/gateway2/...
GO111MODULE=on go generate ./hack/...
Copy link
Contributor

Choose a reason for hiding this comment

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

there was also a go:generate in internal/gateway2/query/query_test.go for generating mocks - do we need to call that here too?

@@ -11,9 +11,9 @@ env:
GITHUB_TOKEN: ${{ github.token }}

jobs:
# Runs the unit tests for `projects/gateway2`
# Runs the unit tests for `internal/gateway2`
Copy link
Member Author

Choose a reason for hiding this comment

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

We're planning on renaming this directory in a follow-up. Similarly, we may need to pull out some internal// files into pkg for external consumption in a follow-up.

The projects/gateway2 is a required job and changing the name
will require changes to our GH settings. We can handle this in
a follow-up to help unblock this stream of work.

Signed-off-by: timflannagan <timflannagan@gmail.com>
@jenshu jenshu added this pull request to the merge queue Feb 6, 2025
Merged via the queue into kgateway-dev:main with commit eca3b94 Feb 6, 2025
9 checks passed
@timflannagan timflannagan deleted the feat/deflate branch February 6, 2025 21:33
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