Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into f/pipeline-experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
Gkrumbach07 committed Aug 10, 2023
2 parents 882f332 + e8f212b commit 83dd6b3
Show file tree
Hide file tree
Showing 209 changed files with 2,556 additions and 33,972 deletions.
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
############### Default settings ###############
BACKEND_PORT=8080
IMAGE_REPOSITORY=quay.io/opendatahub/odh-dashboard:nightly
DOC_LINK ='https://opendatahub.io/docs.html'
COMMUNITY_LINK ='https://opendatahub.io/community.html'
DOC_LINK ='https://opendatahub.io/docs'
COMMUNITY_LINK ='https://opendatahub.io/community'
ENABLED_APPS_CM = 'odh-enabled-applications-config'
KUSTOMIZE_MANIFEST_DIR=manifests
KUSTOMIZE_DEFAULT_OVERLAY=/overlays/dev
DASHBOARD_CONFIG = 'odh-dashboard-config'
36 changes: 26 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Bug Report
description: File a bug report
description: File a bug report.
title: "[Bug]: "
labels: ["kind/bug", "untriaged"]
labels: ["kind/bug", "priority/normal", "untriaged"]
body:
- type: markdown
attributes:
Expand All @@ -12,8 +12,30 @@ body:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- label: I have searched the existing issues
required: true
- type: dropdown
id: deploy-type
attributes:
label: Deploy type
description: How did you deploy the Dashboard?
multiple: false
options:
- OpenDataHub core version (eg. `v1.6.0`)
- Installing Dashboard directly (eg. `v2.12.0`, `commit xyz`, `branch name`)
- Downstream version (eg. `RHODS 1.29`)
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: |
What was the version this was found on?
eg. a branch name, a commit id, or a version number
validations:
required: true
- type: textarea
attributes:
label: Current Behavior
Expand Down Expand Up @@ -55,12 +77,6 @@ body:
- Microsoft Edge
validations:
required: false
- type: textarea
id: opendatahub-version
attributes:
label: Open Data Hub Version
description: Please attach relevant kfdef manifest if applicable
render: yml
- type: textarea
id: anything-else
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Feature request
description: Suggest an idea for this project
description: Suggest an idea for this project.
title: "[Feature Request]: "
labels: ["kind/enhancement", "untriaged"]
labels: ["kind/enhancement", "priority/normal", "untriaged"]
body:
- type: markdown
attributes:
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/internal_story.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: (Internal) Feature Story Template
description: Intended to help with a template for breaking down larger efforts
labels: ["priority/high"]
description: Intended to help with a template for breaking down larger efforts.
title: "[Story]: "
labels: ["kind/story", "priority/high"]
body:
- type: input
id: goal
Expand Down
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/internal_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: (Internal) Test Template
description: Intended to help with a template for creating issues for test coverage.
title: "[Test]: "
labels: ["kind/tech-debt", "priority/normal", "quality"]
body:
- type: input
id: description
attributes:
label: Description
description: A high level goal for the test.
placeholder: Tests the global <feature> page.
validations:
required: true
- type: dropdown
id: type
attributes:
label: What type of test is it?
multiple: false
options:
- e2e (user flow, server data test)
- integration (test data, UI rendering)
- unit (functional test)
validations:
required: true
- type: textarea
id: goals
attributes:
label: Test goals
description: |
Describe the test coverage goals / acceptance criteria.
Eg. what tests are expected / what is the full path for e2e test / what utils are to be tested / etc
placeholder: |
* Test page xyz
* Handle empty states
* etc...
validations:
required: true
- type: textarea
id: dependencies
attributes:
label: Related tests
description: |
A link to related test stories to help with sizing the work
Tip: Using a bullet list will help display links to other tickets by unraveling the name and status of that ticket.
placeholder: |
* #xxxx1
* #xxxx2
value: No related tests
validations:
required: false
16 changes: 12 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!--- If this is a non-code change, this template is not required; reference any issues or top-level descriptions as needed -->
<!--- All code change PRs should relate to an issue, reference it here; see example below -->
<!--- Closes: #123 -->

Expand All @@ -18,9 +19,16 @@
<!--- This PR will be merged by any repository approver when it meets all the points in the checklist -->
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->

- [ ] The commits have meaningful messages (squashes happen on merge by the bot).
- [ ] Included any necessary screenshots or gifs if it was a UI change.
- [ ] Included tags to the UX team if it was a UI/UX change.
- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
Self checklist (all need to be checked):
- [ ] The developer has manually tested the changes and verified that the changes work
- [ ] Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
- [ ] The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:
<!--- You can ignore these if you are doing manifest, backend, internal logic, etc changes; aka non-UI / visual changes -->
- [ ] Included any necessary screenshots or gifs if it was a UI change.
- [ ] Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:
- [ ] The developer has tested their solution on a cluster by using the image produced by the PR to `main`
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.6.0
uses: actions/setup-node@v3.7.0
with:
node-version: ${{ matrix.node-version }}
- name: Node.js modules cache, repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vuln_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run Trivy vulnerability scanner for filesystem
uses: aquasecurity/trivy-action@0.10.0
uses: aquasecurity/trivy-action@0.11.2
with:
scan-type: 'fs'
scan-ref: '.'
Expand Down
69 changes: 27 additions & 42 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ cd backend
npm run start:dev
```

Once you have these running, you can open the dashboard locally at: `http://localhost:4010`. The dev server will reload automatically when you make changes.

#### Give your dev env access

To give your dev environment access to the ODH configuration, log in to the OpenShift cluster and set the project to the location of the ODH installation
Expand Down Expand Up @@ -120,7 +122,7 @@ npm run test:accessibility
npm run test:integration
```

## Build
## Environment variables

### dotenv files

Expand All @@ -147,52 +149,29 @@ The dotenv files have access to default settings grouped by facet; frontend, bac

...

## Deploy your version

Edit the opendatahub KfDef in your project, remove the section:
## Deploy a new dashboard version in your cluster

```yaml
- kustomizeConfig:
repoRef:
name: manifests
path: odh-dashboard
name: odh-dashboard
```
For testing purposes, we recommend deploying a new version of the dashboard in your cluster following the steps below.

Remove the current deployment of the ODH Dashboard
### Prerequisites

```bash
make undeploy
```

or

```bash
npm run make:undeploy
```
1. Make sure you have the `oc` command line tool installed and configured to access your cluster.
2. Make sure you have the `Open Data Hub Operator` installed in your cluster.
3. Remove the `dashboard` component from your `KfDef` CR if already deployed.
4. You can remove previous dashboard deployments by running `make undeploy` or `npm run make:undeploy` in the root of this repository.

### Customize your env

Customize `.env.local` file to image and source information as desired. `npm` and the `s2i` command line tool is required.

```.env.local
IMAGE_REPOSITORY=quay.io/my-org/odh-dashboard:latest
OC_URL=https://specify.in.env:6443
OC_PROJECT=specify_in_.env
# user and password login
OC_USER=specify_in_.env
OC_PASSWORD=specify_in_.env
We use `IMAGE_REPOSITORY` as the environment variable to specify the image to use for the dashboard. You can set it in the `.env.local` file in the root of this repository.
This environment variable is used in the `Makefile` to build and deploy the dashboard image, and can be set to a new image tag to build or to a pre-built image to deploy.

# or token login
#OC_TOKEN=specify_in_.env
```
### Building your image

### Build command
To deploy a new image, you can either build it locally or use the one built by the CI.

Push your branch to your repo for it to be visible to the s2i build.
#### Local Build

Then build:
You can build your image by running

```bash
make build
Expand All @@ -204,7 +183,9 @@ or
npm run make:build
```

### Pushing the image
in the root of this repository. By default, we use [podman](https://podman.io/) as the default container tool, but you can change it by setting the `CONTAINER_TOOL` environment variable to `docker`.

After building the image, you need to push it to a container registry accessible by your cluster. You can do that by running

```bash
make push
Expand All @@ -216,9 +197,15 @@ or
npm run make:push
```

in the root of this repository.

#### Pull Request Images

All pull requests will have an associated `pr-<PULL REQUEST NUMBER>` image built and pushed to [quay.io](https://quay.io/repository/opendatahub/odh-dashboard) for use in testing and verifying code changes as part of the PR code review. Any updates to the PR code will automatically trigger a new PR image build, replacing the previous hash that was referenced by `pr-<PULL REQUEST NUMBER>`.

### Deploying your image

Required: The OpenShift, `oc`, command line tool is required.
To deploy your image, you just need to run the following command in the root of this repository

```bash
make deploy
Expand All @@ -230,6 +217,4 @@ or
npm run make:deploy
```

### Pull Request Images

All pull requests will have an associated `pr-<PULL REQUEST NUMBER>` image built and pushed to [quay.io](https://quay.io/repository/opendatahub/odh-dashboard) for use in testing and verifying code changes as part of the PR code review. Any updates to the PR code will automatically trigger a new PR image build, replacing the previous hash that was referenced by `pr-<PULL REQUEST NUMBER>`.
you will deploy all the resources located in the `manifests` folder alongside the image you selected in the previous step.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG SOURCE_CODE=.

# Use ubi8/nodejs-18 as default base image
ARG BASE_IMAGE="registry.access.redhat.com/ubi8/nodejs-18:1-32.1679484519"
ARG BASE_IMAGE="registry.access.redhat.com/ubi8/nodejs-18:latest"

FROM ${BASE_IMAGE} as builder

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ A dashboard for Open Data Hub components.
ODH requires the following to run:

- [NodeJS and NPM](https://nodejs.org/)
- Node recommended version -> `18.14.0`
- NPM recommended version -> `8.19.4`
- Node recommended version -> `18.16.0`
- NPM recommended version -> `9.6.7`
- [OpenShift CLI](https://docs.openshift.com/container-platform/4.12/cli_reference/openshift_cli/getting-started-cli.html)
- [kustomize](https://github.com/kubernetes-sigs/kustomize)
- [podman](https://github.com/containers/podman)
Expand Down
Loading

0 comments on commit 83dd6b3

Please sign in to comment.