Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 7b8fe97

Browse files
will pankiewiczwill pankiewicz
authored andcommitted
adjust telemetry test
1 parent b886d95 commit 7b8fe97

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
name: Run Tests
155155
command: |
156156
export MONGO_URI="mongodb://mongodb:27017/testdb"
157-
yarn workspace @1kv/telemetry test:int
157+
yarn build && yarn workspace @1kv/telemetry test:int
158158
159159
helmLint:
160160
docker:

packages/common/src/constraints/ValidityChecks.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ export const checkLatestClientVersion = async (
106106
`No latest release found, fetching from GitHub`,
107107
constraintsLabel,
108108
);
109-
latestRelease = await getLatestTaggedRelease();
109+
// fetch from github and set in the db
110+
await getLatestTaggedRelease();
111+
// get the record from the db
112+
latestRelease = await getLatestRelease();
110113
logger.info(
111114
`Latest release fetched from GitHub: ${latestRelease}`,
112115
constraintsLabel,

packages/common/src/monitor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ export default class Monitor {
3939
const { tag_name, published_at } = latestRelease.data;
4040
const publishedAt = new Date(published_at).getTime();
4141

42-
await queries.setRelease(tag_name, publishedAt);
43-
4442
const tagParts = tag_name.split("-");
4543
const version = tagParts[tagParts.length - 1];
4644

45+
await queries.setRelease(version, publishedAt);
46+
4747
if (
4848
this.latestTaggedRelease &&
4949
version === this.latestTaggedRelease!.name

0 commit comments

Comments
 (0)