Skip to content

Commit 826838d

Browse files
Merge pull request #1046 from PeterYurkovich/merge-main-to-alerts-management
NO-JIRA: merge main back in
2 parents 041d16a + 4ef8d07 commit 826838d

378 files changed

Lines changed: 32483 additions & 15086 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: release
33
namespace: openshift
4-
tag: rhel-9-release-golang-1.25-openshift-4.22
4+
tag: rhel-9-release-golang-1.26-openshift-5.0

.coderabbit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
inheritance: true
22
reviews:
33
review_status: false
4+
auto_review:
5+
base_branches:
6+
- main-alerts-management-api

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ dist/
1414
.devspace
1515
web/po-files/
1616
.claude/commands/configs
17+
.claude/settings.local.json
1718
_output/

AGENTS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,53 @@ npm run cypress:open
283283

284284
For detailed testing instructions, see `web/cypress/CYPRESS_TESTING_GUIDE.md`
285285

286+
### Cypress Component Testing
287+
288+
#### Overview
289+
290+
Cypress component tests mount individual React components in isolation, without requiring a running OpenShift cluster. They are useful for testing component rendering, user interactions, and visual behavior with fast feedback.
291+
292+
- **Test location**: `web/cypress/component/`
293+
- **Support file**: `web/cypress/support/component.ts`
294+
- **Config**: `component` section in `web/cypress.config.ts`
295+
296+
#### When to Create Component Tests
297+
298+
- Testing a component's rendering logic (conditional display, empty states)
299+
- Verifying props are handled correctly
300+
- Validating user interactions within a single component
301+
- When E2E tests would be overkill for the behavior under test
302+
303+
#### Quick Test Commands
304+
305+
```bash
306+
cd web
307+
308+
# Interactive mode
309+
npm run cypress:open:component
310+
311+
# Headless mode - all component tests
312+
npm run cypress:run:component
313+
314+
# Run a single component test file
315+
npx cypress run --component --spec cypress/component/labels.cy.tsx
316+
```
317+
318+
#### Writing a Component Test
319+
320+
Component test files use the `.cy.tsx` extension and go in `web/cypress/component/`:
321+
322+
```typescript
323+
import { MyComponent } from '../../src/components/MyComponent';
324+
325+
describe('MyComponent', () => {
326+
it('renders correctly', () => {
327+
cy.mount(<MyComponent prop="value" />);
328+
cy.contains('expected text').should('be.visible');
329+
});
330+
});
331+
```
332+
286333
### Release Pipeline:
287334

288335
- **Konflux**: Handles CI/CD and release automation

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,23 @@ cd web/cypress
411411
npm run cypress:run --spec "cypress/e2e/**/regression/**"
412412
```
413413

414+
### Component Tests (Cypress)
415+
416+
For testing individual React components in isolation (no cluster required):
417+
418+
- Test files: `web/cypress/component/` (`.cy.tsx` extension)
419+
- Support file: `web/cypress/support/component.ts`
420+
421+
```bash
422+
cd web
423+
424+
# Interactive mode
425+
npm run cypress:open:component
426+
427+
# Headless mode
428+
npm run cypress:run:component
429+
```
430+
414431
---
415432

416433
## Internationalization (i18n)

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-9-base-nodejs-openshift-4.19 AS web-builder
1+
FROM registry.redhat.io/ubi9/nodejs-22:latest AS web-builder
22

33
WORKDIR /opt/app-root
44

@@ -8,12 +8,12 @@ ENV HUSKY=0
88

99
COPY web/package.json web/package-lock.json web/
1010
COPY Makefile Makefile
11-
RUN make install-frontend
11+
RUN make install-frontend-ci
1212

1313
COPY web/ web/
1414
RUN make build-frontend
1515

16-
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20 as go-builder
16+
FROM registry.access.redhat.com/ubi9/go-toolset:1.26 AS go-builder
1717

1818
WORKDIR /opt/app-root
1919

@@ -32,7 +32,7 @@ ENV CGO_ENABLED=1
3232

3333
RUN make build-backend BUILD_OPTS="-tags strictfipsruntime"
3434

35-
FROM registry.ci.openshift.org/ocp/4.19:base-rhel9
35+
FROM registry.access.redhat.com/ubi9/ubi-minimal
3636

3737
USER 1001
3838

Dockerfile.art

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-9-base-nodejs-openshift-4.22 AS web-builder
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-base-nodejs-openshift-5.0 AS web-builder
22

33
# Copy app sources
44
COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR
@@ -12,7 +12,7 @@ ENV HUSKY=0
1212
ENV CYPRESS_INSTALL_BINARY=0
1313
RUN make install-frontend-ci && make build-frontend
1414

15-
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS go-builder
15+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS go-builder
1616

1717
COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR
1818
WORKDIR $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app
@@ -23,7 +23,7 @@ ENV CGO_ENABLED=1
2323
RUN source $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/cachito.env \
2424
&& make build-backend BUILD_OPTS="-tags strictfipsruntime"
2525

26-
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
26+
FROM registry.ci.openshift.org/ocp/5.0:base-rhel9
2727

2828
USER 1001
2929

Dockerfile.dev

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.redhat.io/ubi9/nodejs-22:9.6-1755075210 AS web-builder
1+
FROM registry.redhat.io/ubi9/nodejs-22:latest AS web-builder
22

33
WORKDIR /opt/app-root
44

@@ -13,10 +13,7 @@ RUN make install-frontend-ci
1313
COPY web/ web/
1414
RUN make build-frontend
1515

16-
# Almost all images from Red Hat are still on go1.21, however I found one that the cne team has
17-
# created. Once official Red Hat images are available for local development and pulling this
18-
# should be updated
19-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 as go-builder
16+
FROM registry.access.redhat.com/ubi9/go-toolset:1.26 AS go-builder
2017

2118
WORKDIR /opt/app-root
2219

Dockerfile.dev-mcp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ RUN make update-plugin-name
1616

1717
ENV I18N_NAMESPACE="plugin__monitoring-console-plugin"
1818

19-
RUN make install-frontend
19+
RUN make install-frontend-ci
2020
RUN make build-frontend
2121

22-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 as go-builder
22+
FROM registry.access.redhat.com/ubi9/go-toolset:1.25 AS go-builder
2323

2424
WORKDIR /opt/app-root
2525

Dockerfile.mcp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN make update-plugin-name
1616
ENV I18N_NAMESPACE="plugin__monitoring-console-plugin"
1717
RUN make build-frontend
1818

19-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.24 as go-builder
19+
FROM registry.access.redhat.com/ubi9/go-toolset:1.26 AS go-builder
2020

2121
WORKDIR /opt/app-root
2222

@@ -38,7 +38,7 @@ ENV CGO_ENABLED=1
3838

3939
RUN make build-backend
4040

41-
FROM registry.redhat.io/rhel9-4-els/rhel:9.4
41+
FROM registry.access.redhat.com/ubi9/ubi-minimal
4242

4343
RUN mkdir /licenses
4444
COPY LICENSE /licenses/.

0 commit comments

Comments
 (0)