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

Merge Porch into main branch #2815

Merged
merged 90 commits into from Feb 22, 2022
Merged

Merge Porch into main branch #2815

merged 90 commits into from Feb 22, 2022

Conversation

martinmaly
Copy link
Contributor

martinmaly and others added 30 commits January 24, 2022 16:59
Rebased on main and squashed

Co-authored-by: Louis DeJardin <dejardin@google.com>
* Fix Makefile Formatting

* Remove dependency on kptlib
* Tidy modules
* Delete kptlib
* Remove kptlib replace Clause
* Fix Porch Build

Location of ClonerUsingGitExec changed in the OCI branch.

* Add Porch Workflow
* Update VSCode Workspace
* Add launch.json
* Move Clone Logic Into Own File
* Implement Git pacakge fetch
Initial version of the function interfaces.
* Tidy Porch Modules
* Ignore Modules In .build Directory
We can have a git tag that looks like `packageDir/version`, this
allows for independent versioning of packages that share a git repo.

We need to try both ref forms when resolving git packages.
In particular, some of the methods such as GetResources are ambiguous
until we finish the draft (do we want the in-progress resources or the
upstream resources?)
In general, we should always return the error, unless we actually want
to mask it e.g. for security reasons (and in that case, we would
normally expect to log the underlying error instead of wrapping).
* Remove init and deinit (no longer useful)
* Fix module discovery
* Clean up directory references
* Render and Eval via Simple Memory FS
  For now the filesystem is inserted at lower level; In future changes
  the mutation Apply will accept the filesystem abstraction to avoid
  back-and-forth between filesystem and PackageResources.
* Clean up Function Evaluation to use new interface
* Remove unnecessary kpt module
First steps (with lots of hard-coding and hacks) towards applying from
a repository to a cluster.
aggregated-apiservers seem to query these resources, and spam the logs
(at least) if they don't have permission.
We start to expose the status of the sync operation.
Remove kpt directory from Docker build.
* Fix Go Modules

* Run Tidy in Porch Workflow
* Expose Renderer api with FileSystem abstraction

* Merge Fs methods in pkg.go

* Update name

* Merge ReadKptfile and address changes

* Update porch go.sum

* Update results write

* Suggested changes
* Create fix-all and verify-fix-all

We run all the formatters / header makers etc.

In CI, we run them and make sure that the git checkout is still clean.

Ideally we would also run generate, but it is very slow, and it also
requires GOPATH to be set.  We can do that in CI later.

* Add missing headers
* Add install-protoc.sh script
* Define a FunctionEvaluator interface
* Create an empty server implementation
* Integrate porch with renderer interview

* Suggested changes

* Add implementation
Replacing our very primitive apply logic with something better using
server-side apply.
We create a simple git server, and we try round-tripping a package.

Some hacks/todos uncovered that we need to tackle.
Our package logic requires a Kptfile, so adding one (for now).
And make names more consistent.
Several functions are built into the server Docker image and are exec'd
with input.
Added simple client which can be used (in ./func directory):

```
go run ./client \
  --address=192.168.8.202:9445 \
  --package=./config/ \
  --image=gcr.io/kpt-fn/set-namespace:v0.2.0 \
  -- \
  namespace=foo
```
Some blueprints we encounter in tests use the older version of the function.
Newly created Git package returned package resources at its old commit
SHA where no package contents existed, thus returning empty resources.
As package changes, advance the reference to return up-to-date package
revision contents.
* Make Git Server hostable in cluster
* Add makefile targets to build and push its images
* Add PackageRevision .../approval subresource
* Generate client
* Add Clone Package Test
* Fix issues with git server's reporting of symbolic references
Preparing for merge of porch branch back into main,

* Revert "Kpt location parsing (kptdev#2688)"
* Revert "oci-support feature branch (kptdev#2666)"
* Tidy go modules
* Fix year in license header
* Fixed few more issues that crept in during merges from main and preparing for merge back to main.
Copy link
Contributor

@droot droot left a comment

Choose a reason for hiding this comment

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

I reviewed the non-porch portion and seems good to me. Minor clarification on pre-submits. Might ping you offline.

- "docs/**"
- "site/**"

jobs:
Copy link
Contributor

Choose a reason for hiding this comment

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

Two things that will help us to analyze if we need to adjust the presubmit workflow (locally and in CI)

  • How long does the porch specific tests take ?
  • What dependencies do a kpt contributor needs to install to run tests for porch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Porch tests are about 5 mins (https://github.com/GoogleContainerTools/kpt/actions/runs/1867953046)

no dependencies needed.

The e2e tests will have mode where they run against a k8s cluster where they'd install Porch but that part is not yet implemented.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok.

go.mod Outdated Show resolved Hide resolved
- "docs/**"
- "site/**"

jobs:
Copy link
Contributor

Choose a reason for hiding this comment

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

ok.

go.mod Show resolved Hide resolved
@martinmaly martinmaly merged commit 6e783a8 into kptdev:main Feb 22, 2022
@martinmaly martinmaly deleted the merge branch February 22, 2022 21:24
@martinmaly martinmaly restored the merge branch February 22, 2022 21:46
@martinmaly martinmaly deleted the merge branch February 22, 2022 22: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.

None yet

5 participants