Skip to content

Commit f7b9b05

Browse files
committed
feat: Codegen Telemetri Data Indonesia. Update security parameter
1 parent 664a344 commit f7b9b05

63 files changed

Lines changed: 107 additions & 136 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.

.github/workflows/release.yml

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,11 @@ env:
4040
LICENSE: Apache-2.0
4141
HOMEPAGE: https://telemetryflow.id
4242
REGISTRY_DOCKER: docker.io
43-
REGISTRY_GHCR: ghcr.io
4443
IMAGE_BACKEND: telemetryflow/telemetryflow-core
4544
IMAGE_FRONTEND: telemetryflow/telemetryflow-core-viz
46-
GHCR_IMAGE_BACKEND: ghcr.io/${{ github.repository }}
47-
GHCR_IMAGE_FRONTEND: ghcr.io/${{ github.repository }}-viz
4845

4946
permissions:
5047
contents: write
51-
packages: write
5248

5349
jobs:
5450
prepare:
@@ -85,7 +81,25 @@ jobs:
8581
name: Build Docker Images
8682
runs-on: ubuntu-latest
8783
needs: prepare
84+
strategy:
85+
matrix:
86+
include:
87+
- dockerfile: Dockerfile.backend
88+
image_env: IMAGE_BACKEND
89+
component: core-backend
90+
description: NestJS backend for TelemetryFlow Core
91+
- dockerfile: Dockerfile.frontend
92+
image_env: IMAGE_FRONTEND
93+
component: core-viz
94+
description: Vue 3 frontend for TelemetryFlow Core
8895
steps:
96+
- name: Free up disk space
97+
run: |
98+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
99+
sudo rm -rf /opt/hostedtoolcache/CodeQL /usr/local/share/boost /usr/share/swift
100+
sudo apt-get clean
101+
docker system prune -af --volumes || true
102+
89103
- name: Checkout code
90104
uses: actions/checkout@v6
91105

@@ -103,20 +117,12 @@ jobs:
103117
username: ${{ vars.DOCKERHUB_USERNAME }}
104118
password: ${{ secrets.DOCKERHUB_TOKEN }}
105119

106-
- name: Login to GitHub Container Registry
107-
uses: docker/login-action@v3
108-
with:
109-
registry: ${{ env.REGISTRY_GHCR }}
110-
username: ${{ github.actor }}
111-
password: ${{ secrets.GITHUB_TOKEN }}
112-
113120
- name: Docker meta
114121
id: meta
115122
uses: docker/metadata-action@v5
116123
with:
117124
images: |
118-
${{ env.REGISTRY_DOCKER }}/${{ env.IMAGE_BACKEND }}
119-
${{ env.GHCR_IMAGE_BACKEND }}
125+
${{ env.REGISTRY_DOCKER }}/${{ env[matrix.image_env] }}
120126
flavor: |
121127
latest=false
122128
tags: |
@@ -127,17 +133,18 @@ jobs:
127133
type=raw,value=latest,enable=true
128134
labels: |
129135
org.opencontainers.image.title=${{ env.PRODUCT_NAME }}
130-
org.opencontainers.image.description=${{ env.DESCRIPTION }}
136+
org.opencontainers.image.description=${{ matrix.description }}
131137
org.opencontainers.image.vendor=TelemetryFlow
132138
org.opencontainers.image.licenses=${{ env.LICENSE }}
133139
org.opencontainers.image.url=${{ env.HOMEPAGE }}
134140
io.telemetryflow.product=${{ env.PRODUCT_NAME }}
135-
io.telemetryflow.component=core-monorepo
141+
io.telemetryflow.component=${{ matrix.component }}
136142
137-
- name: Build and push Docker images
143+
- name: Build and push Docker image
138144
uses: docker/build-push-action@v7
139145
with:
140146
context: .
147+
file: ./${{ matrix.dockerfile }}
141148
platforms: linux/amd64,linux/arm64
142149
push: true
143150
tags: ${{ steps.meta.outputs.tags }}
@@ -147,8 +154,8 @@ jobs:
147154
GIT_COMMIT=${{ needs.prepare.outputs.commit }}
148155
GIT_BRANCH=${{ needs.prepare.outputs.branch }}
149156
BUILD_TIME=${{ needs.prepare.outputs.build_time }}
150-
cache-from: type=gha
151-
cache-to: type=gha,mode=max
157+
cache-from: type=gha,scope=${{ matrix.component }}
158+
cache-to: type=gha,scope=${{ matrix.component }},mode=max
152159
provenance: true
153160
sbom: true
154161

@@ -316,12 +323,13 @@ jobs:
316323
### Docker Images
317324
318325
```bash
319-
# Docker Hub
326+
# Backend
320327
docker pull telemetryflow/telemetryflow-core:${{ needs.prepare.outputs.version }}
321328
docker pull telemetryflow/telemetryflow-core:latest
322329
323-
# GHCR
324-
docker pull ghcr.io/${{ github.repository }}:${{ needs.prepare.outputs.version }}
330+
# Frontend
331+
docker pull telemetryflow/telemetryflow-core-viz:${{ needs.prepare.outputs.version }}
332+
docker pull telemetryflow/telemetryflow-core-viz:latest
325333
```
326334
327335
### Quick Start
@@ -384,4 +392,4 @@ jobs:
384392
echo "" >> $GITHUB_STEP_SUMMARY
385393
echo "### Docker Images" >> $GITHUB_STEP_SUMMARY
386394
echo "- \`telemetryflow/telemetryflow-core:${{ needs.prepare.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
387-
echo "- \`ghcr.io/${{ github.repository }}:${{ needs.prepare.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
395+
echo "- \`telemetryflow/telemetryflow-core-viz:${{ needs.prepare.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY

backend/src/database/clickhouse/migration-runner.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ type MigrationConstructor = new () => ClickHouseMigration;
4040

4141
function tryRequire(path: string, exportKey: string): MigrationConstructor[] {
4242
try {
43-
// eslint-disable-next-line @typescript-eslint/no-require-imports
4443
const mod = require(path);
4544
return mod[exportKey] || [];
4645
} catch {

backend/src/database/clickhouse/seed-runner.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ type SeedConstructor = new () => ClickHouseSeed;
3434

3535
function tryRequire(path: string, exportKey: string): SeedConstructor[] {
3636
try {
37-
// eslint-disable-next-line @typescript-eslint/no-require-imports
3837
const mod = require(path);
3938
return mod[exportKey] || [];
4039
} catch {

backend/src/database/postgres/migration-runner.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ function tryRequire(
3636
exportKey: string,
3737
): (new () => MigrationInterface)[] {
3838
try {
39-
// eslint-disable-next-line @typescript-eslint/no-require-imports
4039
const mod = require(path);
4140
return mod[exportKey] || [];
4241
} catch {

backend/src/database/postgres/seed-runner.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ type SeedConstructor = new () => PostgresSeed;
2727

2828
function tryRequire(path: string, exportKey: string): SeedConstructor[] {
2929
try {
30-
// eslint-disable-next-line @typescript-eslint/no-require-imports
3130
const mod = require(path);
3231
return mod[exportKey] || [];
3332
} catch {

backend/src/modules/alerting/application/services/TfqlValidation.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
TfqlLexerError,
77
TfqlParserConfig,
88
} from '../../../query/domain/types/tfql.types';
9-
import { TfqlAstNode, FetchNode, CorrelateNode, QueryTarget } from '../../../query/domain/types/ast-nodes.types';
9+
import { TfqlAstNode, FetchNode, CorrelateNode } from '../../../query/domain/types/ast-nodes.types';
1010
import {
1111
ValidateTfqlQueryRequestDto,
1212
TfqlValidationResultDto,
@@ -131,7 +131,7 @@ export class TfqlValidationService {
131131
/**
132132
* Generate suggestions for improving the query
133133
*/
134-
private generateSuggestions(ast: TfqlAstNode, query: string): string[] {
134+
private generateSuggestions(ast: TfqlAstNode, _query: string): string[] {
135135
const suggestions: string[] = [];
136136

137137
if (ast.type === 'FETCH') {

backend/src/modules/alerting/domain/rules-library/categories/web-servers/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
AlertRuleTemplate,
99
AlertRuleCategory,
1010
RuleCategory,
11-
DefaultThresholds,
1211
DefaultDurations,
1312
} from "../../types";
1413
import { AlertRuleBuilder, ConditionBuilder } from "../../utils";

backend/src/modules/alerting/infrastructure/schedulers/AlertEvaluation.scheduler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
import { AlertRule, AlertRuleState } from "../../domain/aggregates/AlertRule";
1313
import {
1414
AlertInstance,
15-
AlertInstanceStatus,
1615
} from "../../domain/aggregates/AlertInstance";
1716
import { NotificationChannelService } from "../../application/services/NotificationChannel.service";
1817
import type { AlertNotification } from "../services/INotificationSender";

backend/src/modules/alerting/presentation/dto/ListAlertInstances.query.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
IsOptional,
33
IsInt,
4-
IsString,
54
IsEnum,
65
IsDateString,
76
IsUUID,

backend/src/modules/alerting/presentation/dto/UpdateAlertRule.request.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
IsArray,
55
IsEnum,
66
IsObject,
7-
IsBoolean,
87
MaxLength,
98
ValidateNested,
109
} from "class-validator";

0 commit comments

Comments
 (0)