Skip to content

Commit

Permalink
[RHOAIENG-4219] Add internal dashboard version
Browse files Browse the repository at this point in the history
  • Loading branch information
dgutride committed May 23, 2024
1 parent bac0976 commit 519fcfc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/release-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Details on how we will do a release are being worked on and will likely update t
> Note: the version number should be the last release number with an increment on the patch version (see [release version](#version-numbers))
* Catch up `incubation` branch with the `main` branch
* Change the INTERNAL_DASHBOARD_VERSION value in ~/.env to the next release number
* Go to our [quay repo] & "Add New Tag" off of the latest `main` build
* `vX.YY.Z-incubation` naming convention (eg. `v1.23.4-incubation`)
* Get the latest sha digest value for this release
Expand Down
3 changes: 3 additions & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ ODH_LOGO=odh-logo.svg
ODH_PRODUCT_NAME=Open Data Hub
ODH_FAVICON=odh-favicon.svg
ODH_NOTEBOOK_REPO=opendatahub

########## Change this version with each dashboard release ###########
INTERNAL_DASHBOARD_VERSION=v2.22.0
2 changes: 2 additions & 0 deletions frontend/src/utilities/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const { ODH_PRODUCT_NAME } = process.env;
const { ODH_NOTEBOOK_REPO } = process.env;
const DASHBOARD_CONFIG = process.env.DASHBOARD_CONFIG || 'odh-dashboard-config';
const { EXT_CLUSTER } = process.env;
const { INTERNAL_DASHBOARD_VERSION } = process.env;

export {
DEV_MODE,
Expand All @@ -32,6 +33,7 @@ export {
DASHBOARD_CONFIG,
WS_HOSTNAME,
EXT_CLUSTER,
INTERNAL_DASHBOARD_VERSION,
};

export const DOC_TYPE_TOOLTIPS = {
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/utilities/segmentIOUtils.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TrackingEventProperties } from '~/types';
import { DEV_MODE } from './const';
import { DEV_MODE, INTERNAL_DASHBOARD_VERSION } from './const';

// The following is like the original method below, but allows for more 'free form' properties.
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/explicit-module-boundary-types
Expand All @@ -9,7 +9,9 @@ export const fireTrackingEventRaw = (eventType: string, properties?: any): void
/* eslint-disable-next-line no-console */
console.log(
`Telemetry event triggered: ${eventType}${
properties ? ` - ${JSON.stringify(properties)}` : ''
properties
? ` - ${JSON.stringify(properties)} for version ${INTERNAL_DASHBOARD_VERSION}`
: ''

Check warning on line 14 in frontend/src/utilities/segmentIOUtils.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/segmentIOUtils.tsx#L13-L14

Added lines #L13 - L14 were not covered by tests
}`,
);
} else if (window.analytics) {
Expand All @@ -26,7 +28,9 @@ export const fireTrackingEvent = (
/* eslint-disable-next-line no-console */
console.log(
`Telemetry event triggered: ${eventType}${
properties ? ` - ${JSON.stringify(properties)}` : ''
properties
? ` - ${JSON.stringify(properties)} for version ${INTERNAL_DASHBOARD_VERSION}`
: ''

Check warning on line 33 in frontend/src/utilities/segmentIOUtils.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/segmentIOUtils.tsx#L32-L33

Added lines #L32 - L33 were not covered by tests
}`,
);
} else if (window.analytics) {
Expand Down

0 comments on commit 519fcfc

Please sign in to comment.