Thanks for your interest in the opendatahub-operator project! You can contribute to this project in various ways: filing bug reports, proposing features, submitting pull requests (PRs), and improving documentation.
Before you begin, please take a look at our contribution guidelines below to ensure that your contribuutions are aligned with the project's goals.
Issues are tracked using Jira. If you encounter a bug or have suggestions for enhancements, please follow the steps below:
- Check for Existing Issues: Before creating a new issue, search the Jira project to see if a similar issue already exists.
- Create a Jira Ticket: If the issue doesn’t exist, create a new ticket in Jira.
- For Feature Requests: Set the issue type to be
Initative
- For Bugs: Set the issue type to
Bug
- For all other code changes: Use the issue type
Story
- For Feature Requests: Set the issue type to be
- Fork the Repository: Create your own fork of the repository to work on your changes.
- Create a Branch: Create your own branch to include changes for the feature or a bug fix off of
incubation
branch. - Work on Your Changes: Commit often, and ensure your code adheres to these Code Style Guidelines and passes all the quality gates for the operator.
- Testing: Make sure your code passes all the tests, including any new tests you've added.
- Link to Jira Issue: Include the Jira issue link in your PR description.
- Description: Provide a detailed description of the changes and what they fix or implement.
- Add Testing Steps: Provide information on how the PR has been tested, and list out testing steps if any for reviewers.
- Review Request: Tag the relevant maintainers(@opendatahub-io/odh-operator-maintainers ) or team members(@opendatahub-io/odh-platform-members) for a review.
- Resolve Feedback: Be open to feedback and iterate on your changes.
To ensure the contributed code adheres to the project goals, we have set up some automated quality gates:
- linters: Ensure the check for linters is successful. If it fails, run
make lint
to resolve errors - api-docs: Ensure the api-docs are updated when making changes to operator apis. If it fails, run
make generate manifests api-docs
to resolve errors - unit-tests: Ensure unit tests pass. Run
make unit-tests
- e2e-tests: Ensure CI job for e2e tests pass. Refer run e2e locally to debug. CI test logs can also be found under
Artifacts
directory under Job details.
- Follow the Go community’s best practices, which can be found in the official Effective Go guide.
- Follow the best practices defined by the Operator SDK.
- Use
go fmt
to automatically format your code. - Ensure your code passes
make lint
(we have a .golangci.yml file configured in the repo). - Ensure you write clear and concise comments, especially for exported functions.
- Always check and handle errors appropriately. Avoid ignoring errors by using _.
- Make sure to run
go mod tidy before
submitting a PR to ensure thego.mod
andgo.sum
files are up-to-date.
We follow the conventional commits format for writing commit messages. A good commit message should include:
- Type:
fix
,feat
,docs
,chore
, etc. Note: All commits exceptchore
require an associated jira issue. Please add link to your jira issue. - Scope: A short description of the area affected.
- Summary: A brief explanation of what the commit does.
- When a PR is opened, we have set up an OpenShift CI job that creates an operator image with the changes -
quay.io/opendatahub/opendatahub-operator:pr-<pr-number>
. - Set up your environment to override Makefile defaults as described here
- Use developer guide to deploy operator using OLM on a cluster.
- Follow the steps given here to run e2e tests in your environment.
After a PR is merged into the upstream opendatahub-io/opendatahub-operator
repository, the changes need to be synced with the downstream repository:
- Cherry-Pick: Use
git cherry-pick
to apply the changes to the downstream repo (rhods-operator). - Version Labels: Ensure the downstream PR is labeled with the target release version (e.g.,
rhoai-2.14
). - Operator Bundle or Dockerfile Updates: If changes affect the operator bundle or Dockerfile, sync the changes in the
rhods-cpaas-midstream
repo in addition to downstream PR.
Follow the same PR Guide for creating and reviewing downstream PRs.
For general questions, feel free to open a discussion in our repository or communicate via:
- Slack: All issues related to ODH platform can be discussed in #forum-openshift-ai-operator channel.
- Jira Comments: Feel free to discuss issues directly on Jira tickets.