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 Nexus outgoing service registry #5523

Merged
merged 28 commits into from
Mar 20, 2024
Merged

Conversation

MichaelSnowden
Copy link
Contributor

@MichaelSnowden MichaelSnowden commented Mar 13, 2024

What changed?

I implemented the operator service CRUD APIs for Nexus outgoing services.

Why?

How did you test it?

There's nearly 100% test coverage across unit tests and functional tests. It's only not 100% because of redundancy between create / update.

Potential risks

Documentation

Is hotfix candidate?

@MichaelSnowden MichaelSnowden force-pushed the snowden/operator-service branch 2 times, most recently from 2401e8e to 7360d42 Compare March 13, 2024 01:52
@MichaelSnowden MichaelSnowden marked this pull request as ready for review March 14, 2024 02:28
@MichaelSnowden MichaelSnowden requested a review from a team as a code owner March 14, 2024 02:28
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

The implementation is near flawless. I think I only found one bug.
The code is well documented and tested.

I left some comments, most of them are nits or stylistic.

common/dynamicconfig/constants.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
tests/outgoing_service_registry_test.go Outdated Show resolved Hide resolved
common/nexus/outgoing_service_registry.go Outdated Show resolved Hide resolved
common/nexus/outgoing_service_registry.go Outdated Show resolved Hide resolved
common/nexus/outgoing_service_registry.go Outdated Show resolved Hide resolved
common/nexus/outgoing_service_registry.go Outdated Show resolved Hide resolved
common/nexus/outgoing_service_registry.go Outdated Show resolved Hide resolved
Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

LGTM.

There are still some unaddressed comments from my last review. Mostly nits.

common/nexus/nexustest/namespace_service.go Outdated Show resolved Hide resolved
common/nexus/outgoing_service_registry.go Outdated Show resolved Hide resolved
common/nexus/outgoing_service_registry.go Outdated Show resolved Hide resolved
@MichaelSnowden MichaelSnowden enabled auto-merge (squash) March 20, 2024 00:09
@MichaelSnowden MichaelSnowden merged commit 970e80f into main Mar 20, 2024
42 checks passed
@MichaelSnowden MichaelSnowden deleted the snowden/operator-service branch March 20, 2024 00:25
MichaelSnowden added a commit that referenced this pull request Mar 20, 2024
## What changed?
<!-- Describe what has changed in this PR -->
There was a small issue in #5523 where we check an "issue set" against
nil in the outgoing service registry code. The issue set is supposed to
track a list of request issues to form one big invalid argument error if
its length is greater than zero. However, we had code that looked like
this:

```go
if issues := getIssuesFromCommonRequest(req); issues != nil {
  return nil, issues.GetError()
}
```

Which works because we return a nil issues set if there's no issues,
but, technically, we could have a non-nil issues set with no issues, so
it should instead be something like this:

```go
if err := getIssuesFromCommonRequest(req).GetError(); err != nil {
  return nil, err
}
```

## Why?
<!-- Tell your future self why have you made these changes -->

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
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.

3 participants