Skip to content

[cherry-pick]: from ODH to RHOAI with refactor and bug fixes - #232

Merged
zdtsw merged 8 commits into
red-hat-data-services:mainfrom
zdtsw-forking:sync_2.10_2
Mar 25, 2024
Merged

zdtsw merged 8 commits into
red-hat-data-services:mainfrom
zdtsw-forking:sync_2.10_2

Conversation

@zdtsw

@zdtsw zdtsw commented Mar 25, 2024 •

Copy link
Copy Markdown

live build quay.io/wenzhou/rhods-operator-catalog:v2.10.232

cam-garrison and others added 7 commits March 25, 2024 08:21
…ices#906)

This change aims to enhance the readability of our test suite.

It brings `/crds` and `/templates` into `/fixtures` and moves more helper functions out into dedicated files.
This update incorporates the `gci` tool into the `make fmt` command, aiming to improve the formatting of Go files and ensure that imports adhere to our established conventions.

Unfortunately, due to how `.golangci.yml` is defined, we are not able to just use `--disable-all --enable=gci` flags. This yields an error as we use `enable-all` and `disable` in the config file for linter.

To address this, the `golangci-lint` configuration is dynamically adjusted using the `yq` tool, which is now included in our toolchain.

This process creates a temporary configuration file specifically for `golangci-lint` execution, ensuring `gci`'s integration without altering the primary linting setup.

Furthermore, the generated temporary file is added to the `CLEANFILES` list, ensuring its removal when calling `make clean`, maintaining a clean build environment.

To prevent this temporary file from being tracked by Git, a `*.mktmp.*` pattern has been added to our `.gitignore`, safeguarding against accidental inclusion of temporary files in the repository.: 

### Tidies

- removes duplicate `blank` import section in `gci` config, otherwise it can add `_` imports twice
)

As the number of test cases (grouped as `Describe`) started to grow, we can split a single file into several groups per functionality.

Follow-up for red-hat-data-services#906.
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Wen Zhou <wenzhou@redhat.com>
@zdtsw
zdtsw requested a review from VaishnaviHire March 25, 2024 07:26
Signed-off-by: Zhou, Wen <wenzhou@redhat.com>
@zdtsw
zdtsw merged commit dd2b28f into red-hat-data-services:main Mar 25, 2024
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.

4 participants