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

Implement bosh integration #17

Merged

Conversation

a18e
Copy link
Contributor

@a18e a18e commented Mar 14, 2023

No description provided.

a18e and others added 26 commits March 2, 2023 16:49
BoshCapture -> BoshQuery
CloudfoundryCapture -> CloudfoundryQuery
Capture -> AgentEndpoints
(Works with current implementation of pcap-api)
AgentEndpoints -> EndpointRequest
- client.go not yet used
- update config.example.yml to current yaml config
- Working bosh_agent_resolver tests
- mock-bosh-api reuses mock jwt and bosh api
- Refactoring: EndpointQueryHandler -> AgentResolver (interface & BoshAgentResolver)
- minor optimizations to mock-bosh-api
- minor optimizations to mock-bosh-api
- use zap for logging in client
- fixes for protobuf refactor/rename
- integration_test: SetupBoshAgentResolver (currently non-functional (only supports one port)
- forward captureinfo fields timestamp and length from agent to client
- fix logging in client
- bosh_agent_resolver.go: make setup private, include in constructor, adjust tests
- TLS configuration for pcap-bosh-cli against BoshDirectorAPI & pcap-api
- refactor client
- [WIP] unit tests for client
- minor type change in pcap.proto
- pb type fix for pcap-api-cli
- move bosh-environment logic to bosh.go
- clean up bosh-cli/main.go
 - comments in bosh-cli/main.go
 - adjust tests to new Environment handling
 - linter fixes
BoshResolver, CfResolver
Copy link
Contributor

@peanball peanball left a comment

Choose a reason for hiding this comment

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

First part of the review. Next is the package pcap.

src/pcap/cmd/mock-bosh-api/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-api/config.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-api/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
Copy link
Contributor

@peanball peanball left a comment

Choose a reason for hiding this comment

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

next batch of files reviewed.

continuing at bosh_resolver_test.go

src/pcap/config/config.example.yml Outdated Show resolved Hide resolved
src/pcap/test/mocks.go Outdated Show resolved Hide resolved
src/pcap/agent.go Outdated Show resolved Hide resolved
src/pcap/agent.go Outdated Show resolved Hide resolved
src/pcap/bosh_resolver.go Outdated Show resolved Hide resolved
src/pcap/bosh_resolver.go Outdated Show resolved Hide resolved
src/pcap/bosh_resolver.go Outdated Show resolved Hide resolved
src/pcap/bosh_resolver.go Outdated Show resolved Hide resolved
src/pcap/bosh_resolver.go Outdated Show resolved Hide resolved
src/pcap/bosh_resolver.go Outdated Show resolved Hide resolved
src/pcap/cf_resolver.go Outdated Show resolved Hide resolved
src/pcap/client.go Show resolved Hide resolved
src/pcap/client.go Outdated Show resolved Hide resolved
src/pcap/client.go Show resolved Hide resolved
src/pcap/client.go Outdated Show resolved Hide resolved
src/pcap/pcap_test.go Outdated Show resolved Hide resolved
src/pcap/bosh/bosh.go Outdated Show resolved Hide resolved
src/pcap/bosh/bosh.go Outdated Show resolved Hide resolved
src/pcap/token.go Outdated Show resolved Hide resolved
src/pcap/token.go Outdated Show resolved Hide resolved
- integration test for client
@peanball peanball requested review from maxmoehl, b1tamara and peanball and removed request for peanball April 12, 2023 14:02
src/pcap/process.go Outdated Show resolved Hide resolved
The setup() function is called explicitly in `NewBoshResolver()`.
Add per-call location list of signals and make clear that this function
is generic.
@peanball peanball requested a review from maxmoehl April 13, 2023 15:58
Copy link
Member

@maxmoehl maxmoehl left a comment

Choose a reason for hiding this comment

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

Just a few things left :)

src/pcap/cmd/pcap-api/main.go Show resolved Hide resolved
src/pcap/cmd/pcap-api/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main.go Outdated Show resolved Hide resolved
src/pcap/cmd/pcap-bosh-cli/main_test.go Show resolved Hide resolved
src/pcap/test/integration/agent_api_client.go Outdated Show resolved Hide resolved
src/pcap/api.go Outdated Show resolved Hide resolved
src/pcap/bosh.go Outdated Show resolved Hide resolved
src/pcap/bosh.go Show resolved Hide resolved
peanball and others added 4 commits April 14, 2023 07:25
Co-authored-by: Maximilian Möhl <[email protected]>
There is a deferred exit handler already. Reuse that one but don't log
the error (again) via logger if it's a flags parsing error. The flags
package already prints out the error to stdout.
Also correct some error handling aronud JSON parsing.
@peanball peanball requested a review from maxmoehl April 14, 2023 07:21
@peanball peanball merged commit 303eee0 into cloudfoundry:main Apr 14, 2023
@maxmoehl maxmoehl deleted the implement-bosh-integration branch April 14, 2023 08:09
@CFN-CI
Copy link
Contributor

CFN-CI commented May 12, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released run-ci Triggers PR Validation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants