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

⚠️ [Monorepo] PHASE 1 - Add Catalogd to Operator-Controller Repository #1542

Merged
merged 354 commits into from
Jan 9, 2025

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Jan 3, 2025

Description

This PR integrates the catalogd project into the operator-controller monorepo and addresses several follow-up issues to ensure seamless functionality. Additionally, it moves the CI jobs implemented for catalogd to the root of the repository for a unified setup.

EPIC: #1335


Key Changes

  1. Add catalogd to the Monorepo

    • Integrated the catalogd source code into the operator-controller repository with the script. (see script changes here)
  2. Follow-Up Changes

    • Moved catalogd-specific CI jobs to the root directory
    • Unified e2e tests and release workflows for both projects.
    • Unified Lint and fix issues
    • Unified Bingo
    • Remove duplicated and redundant files

PHASE 1

Following the items addressed:

Commits Overview

Commits Done via Script

Below is a summary of the initial commits generated by the migration script:

Screenshot 2025-01-07 at 12 21 33

Commits Done as Follow-Up

After the script ran, several follow-up commits were made to allow us get this first step merged:

Screenshot 2025-01-08 at 12 50 15

Mikalai Radchuk and others added 30 commits July 28, 2023 11:55
We do not want to fail the job if codecov fails
to upload the report due to rate limiting.

Signed-off-by: Mikalai Radchuk <[email protected]>
Signed-off-by: Andy Goldstein <[email protected]>
Signed-off-by: Andy Goldstein <[email protected]>
Marking the CatalogMetadataAPI feature gate as Deprecated before introducing the HTTP server as a default mechanism to serve catalog contents

Signed-off-by: Rashmi Gottipati <[email protected]>
* add metrics to catalogd http server

that can be used for calculating the Apdex Score
and assess the health of the http server that is
serving catalog contents to clients

Signed-off-by: Bryce Palmer <[email protected]>

* quick fixes from review comments

Signed-off-by: Bryce Palmer <[email protected]>

* rename package from server --> metrics

Signed-off-by: Bryce Palmer <[email protected]>

* rename package from server --> metrics

Signed-off-by: Bryce Palmer <[email protected]>

---------

Signed-off-by: Bryce Palmer <[email protected]>
…work#166)

* (docs): Add docs on fetching contents via HTTP server

Signed-off-by: Bryce Palmer <[email protected]>

* add curl examples

Signed-off-by: Bryce Palmer <[email protected]>

---------

Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
…erator-framework#169)

* (refactor): Remove deprecated CatalogMetadata and associated code

Signed-off-by: Bryce Palmer <[email protected]>

* go mod tidy

Signed-off-by: Bryce Palmer <[email protected]>

---------

Signed-off-by: Bryce Palmer <[email protected]>
Add release guide

Signed-off-by: Catherine Chan-Tse <[email protected]>
* Add contributing guide to catalogd

Signed-off-by: Rashmi Gottipati <[email protected]>

* Address review comments

Signed-off-by: Rashmi Gottipati <[email protected]>

---------

Signed-off-by: Rashmi Gottipati <[email protected]>
Add default printer columns

Signed-off-by: kevinrizza <[email protected]>
…operator-framework#145)

(feat): direct image registry client unpacker

Signed-off-by: Bryce Palmer <[email protected]>
…k#196)

* (techdebt): refactor catalog controller unit tests

to no longer use Ginkgo and instead use
the native Go testing and testify

Signed-off-by: Bryce Palmer <[email protected]>

* remove rebase detritus, unnecessary IIFE, and featuregate comments/blocks. goimports.

Signed-off-by: Bryce Palmer <[email protected]>

---------

Signed-off-by: Bryce Palmer <[email protected]>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](golang/net@v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…mpatible (operator-framework#195)

Bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.1+incompatible to 23.0.3+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v23.0.1...v23.0.3)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
GoDoc for Phase

Signed-off-by: Anik Bhattacharjee <[email protected]>
@camilamacedo86 camilamacedo86 changed the title ⚠️ [Monorepo] Add Catalogd to Operator-Controller Repository ⚠️ [Monorepo] PHASE 1 - Add Catalogd to Operator-Controller Repository Jan 8, 2025
@camilamacedo86 camilamacedo86 requested a review from tmshort January 8, 2025 13:27
@@ -321,7 +321,7 @@ export GORELEASER_ARGS

.PHONY: release
release: $(GORELEASER) #EXHELP Runs goreleaser for the operator-controller. By default, this will run only as a snapshot and will not publish any artifacts unless it is run with different arguments. To override the arguments, run with "GORELEASER_ARGS=...". When run as a github action from a tag, this target will publish a full release.
$(GORELEASER) $(GORELEASER_ARGS)
OPERATOR_CONTROLLER_IMAGE_REPO=$(IMAGE_REPO) CATALOGD_IMAGE_REPO=$(CATALOG_IMAGE_REPO) $(GORELEASER) $(GORELEASER_ARGS)
Copy link
Member

Choose a reason for hiding this comment

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

Looks good. I tested this successfully.

catalogd/Dockerfile Outdated Show resolved Hide resolved
catalogd/tilt.md Outdated

Any time you change any of the files listed in the `deps` section in the `<binary name>_binary` `local_resource`,
Tilt automatically rebuilds the go binary. As soon as the binary is rebuilt, Tilt pushes it (and only it) into the
appropriate running container, and then restarts the process.
Copy link
Member

Choose a reason for hiding this comment

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

We already have https://github.com/operator-framework/operator-controller/blob/main/docs/contribute/developer.md. But this doc might contain more details. Wondering if we should keep it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just checked, and the info is the same.
The ONLY extra info in the catalogd doc is

Shortly after starting, Tilt processes the `Tiltfile`, resulting in:

- Building the go binaries
- Building the images
- Loading the images into kind
- Running kustomize and applying everything except the Deployments that reference the images above
- Modifying the Deployments to use the just-built images
- Creating the Deployments

## Making code changes

Any time you change any of the files listed in the `deps` section in the `<binary name>_binary` `local_resource`,
Tilt automatically rebuilds the go binary. As soon as the binary is rebuilt, Tilt pushes it (and only it) into the
appropriate running container, and then restarts the process.

It has been added to the root document.

Makefile Outdated Show resolved Hide resolved
Copy link

@OchiengEd OchiengEd left a comment

Choose a reason for hiding this comment

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

Should be good once all outstanding issues are resolved. Specifically, Todd's comment.

- Consolidated the release process to use `operator-controller.yaml` for all requirements.
- Removed `catalogd.yaml` as it is no longer necessary.
- Simplified the release action:
  - A single release action now generates images and binaries for both projects.
  - Unified process ensures consistent release management across the monorepo.
- Updated the root `Makefile` with a unified `test-unit` target to execute unit tests for the entire project.
- Removed the `test-unit` target from the `Makefile` under the `catalogd` directory as it is no longer needed.
camilamacedo86 and others added 3 commits January 9, 2025 04:55
- Added `.tilt-support` directory at the root, updated to work with both `operator-controller` and `catalogd`.
- Removed the Tilt workflow from the `catalogd` directory, consolidating all configurations into the root Tilt setup.
- Updated configurations to use `catalogd` from the source code instead of fetching it from `github.com/operator-framework/catalogd`.

Co-authored-by: Joe Lanford <[email protected]>
- Removed `check-go-version.sh` from `catalogd/hack/scripts` as it is no longer needed.
  - Both projects now rely on the `go.mod` file at the root directory for Go version checks.

- Removed duplicated files from the repository:
  - `CODEOWNERS`
  - `CONTRIBUTING.md`
  - `DOC`
  - `LICENSE.md`

- Use hack/boilerplate.go.txt from root and remove duplication
- Standardized Bingo definitions across `catalogd` and `operator-controller`.
- Ensured both projects use the same Bingo config to maintain consistency
pushd ..
git clone https://github.com/operator-framework/tilt-support
popd
```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joelanford ^ I removed it since now we have it locally.
@LalatenduMohanty

Copy link
Member

@LalatenduMohanty LalatenduMohanty left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2025
@LalatenduMohanty LalatenduMohanty added this pull request to the merge queue Jan 9, 2025
Copy link

@OchiengEd OchiengEd left a comment

Choose a reason for hiding this comment

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

lgtm

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 9, 2025
@tmshort tmshort added this pull request to the merge queue Jan 9, 2025
Merged via the queue into operator-framework:main with commit 75bb73e Jan 9, 2025
23 of 25 checks passed
@camilamacedo86 camilamacedo86 deleted the monorepo_camila branch January 9, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet