Compare commits

..
Author SHA1 Message Date
marcos.rodrigues 00cbadbb45 Merge branch 'beta' into bugfix/catalog-module 2026-08-07 12:26:11 -03:00
marcos.rodrigues 47ad527d38 FIX: skip nimbus update when customer haven't catalog module 2026-08-07 12:18:37 -03:00
iruy-fr 51044a23b3 FIX: trigger cache connections rollout 2026-08-03 09:19:27 -03:00
yuri.rodrigues bb29d126c1 Merge pull request #503 from dadosfera/feat/cache-connections-rollout
feat(connection-test): refresh connection catalog cache
2026-07-31 20:56:11 -03:00
iruy-fr 9d0f449eeb feat(connection-test): refresh connection catalog cache 2026-07-31 16:33:15 -03:00
iruy-fr 0eafa67e6f FIX: trigger cache connections deployment 2026-07-31 09:56:05 -03:00
yuri.rodrigues c3937472ec Merge pull request #502 from dadosfera/feat/cache-connections-rollout
feat: read connection metadata from catalog cache
2026-07-31 09:46:57 -03:00
iruy-fr 84d64424ca feat: read connection metadata from catalog cache 2026-07-30 10:17:28 -03:00
vinicius gadea f0bfc5c94b Merge pull request #500 from dadosfera/feat/custom-properties
FEAT: add color and emoji properties to CustomPropertyDto
2026-07-28 12:21:19 -03:00
viniciusgadea ad86a6a698 FEAT: simplify color and emoji property definitions in docsfera.json 2026-07-28 12:01:50 -03:00
viniciusgadea af3b11ad54 FEAT: add color and emoji properties to CustomPropertyDto 2026-07-28 07:42:18 -03:00
vinicius gadea 15860519e1 Merge pull request #498 from dadosfera/feat/custom-properties
FEAT: add custom properties endpoints and DTOs for catalog management
2026-07-22 11:57:51 -03:00
viniciusgadea cffda86eab FEAT: add CustomPropertyDto and update IUpdateDataRequest to use custom properties array 2026-07-22 10:51:53 -03:00
viniciusgadea a93fbfbbd9 FEAT: remove custom properties endpoints and DTOs from catalog management 2026-07-21 16:32:38 -03:00
viniciusgadea e1cfc6e1a8 FEAT: add custom properties endpoints and DTOs for catalog management 2026-07-21 11:21:22 -03:00
vinicius gadea 1e63df6536 Merge pull request #497 from dadosfera/feat/documentation-status
FEAT: add endpoint and logic to update data asset certification status
2026-07-20 13:44:43 -03:00
viniciusgadea 8eb7fd0169 FEAT: add endpoint and logic to update data asset certification status 2026-07-17 09:55:17 -03:00
vinicius gadea f8c6a8b747 Merge pull request #496 from dadosfera/feat/documentation-status
FIX: pin npm version to 10.8.2 in Dockerfile for consistency
2026-07-16 17:06:04 -03:00
viniciusgadea 8a9d6c2f9c FIX: pin npm version to 10.8.2 in Dockerfile for consistency 2026-07-16 17:05:10 -03:00
vinicius gadea bcb2a0b7cb Merge pull request #495 from dadosfera/feat/documentation-status
Feat/documentation status
2026-07-16 16:47:52 -03:00
viniciusgadea 2e181e70af FEAT: rename documentation_status to certification_status in docs and update package.json for protospack versioning 2026-07-16 09:08:11 -03:00
vinicius gadea ef615adb8e Merge branch 'beta' into feat/documentation-status 2026-07-13 08:42:37 -03:00
viniciusgadea e03900811b FEAT: add documentation status enum and property to data asset 2026-07-13 08:33:35 -03:00
yuri.rodrigues 5bc5fb0977 Merge pull request #494 from dadosfera/feat/pipeline-run-jobs
feat: add endpoint to retrieve pipeline run jobs
2026-06-23 13:38:55 -03:00
iruy-fr 011032e3d4 FEAT: update API title in docsfera.json to reflect project name 2026-06-23 11:58:28 -03:00
iruy-fr 17363e74f4 FEAT: simplify pipeline run jobs handling and normalize run ID usage 2026-06-23 11:54:59 -03:00
iruy-fr 63efff6adf FEAT: enhance pipeline run jobs endpoint with error handling and response structure 2026-06-22 20:25:16 -03:00
iruy-fr b5f569e522 Merge branch 'beta' into feat/pipeline-run-jobs
# Conflicts:
#	docsfera.json
2026-06-19 17:08:34 -03:00
iruy-fr 5c77577992 feat: add endpoint to retrieve pipeline run jobs 2026-06-19 17:04:42 -03:00
marcos.rodrigues 4b9e113185 Merge pull request #493 from dadosfera/chore/remove-deprecated-lib
FEAT: remove deprecated protospack lib
2026-06-14 15:10:22 -03:00
marcos.rodrigues 06d505c50a FEAT: remove deprecated protospack lib 2026-06-13 21:07:14 -03:00
Marcos Rodrigues Silva 2177f6725c Merge pull request #491 from dadosfera/hotfix/release-notes
Hotfix/release notes
2026-05-25 14:10:46 -03:00
marcos-silva-rodrigues 65ab16236f FEAT: update deployment to include firebase base url 2026-05-25 14:09:16 -03:00
marcos-silva-rodrigues b4cc8151d7 FIX: release note endpoint 2026-05-25 14:01:00 -03:00
yuri.rodrigues e8b982998f Merge pull request #490 from dadosfera/feat/platform-job-rout
Feat/platform job rout
2026-05-21 16:48:38 -03:00
iruy-fr ccd4159c59 fix: validate workflow 2026-05-21 16:43:37 -03:00
iruy-fr 9e49abb40d fix: validate workflow 2026-05-21 16:37:47 -03:00
iruy-fr 21a82b64f3 fix: validate workflow 2026-05-21 16:31:45 -03:00
iruy-fr 2414fcf21e fix: validate workflow 2026-05-21 16:23:45 -03:00
iruy-fr 94fbdb2226 fix: validate workflow 2026-05-21 16:21:30 -03:00
iruy-fr 985170d7ae chore: exposure from route pipeline run jobs to maestro 2026-05-21 16:12:35 -03:00
iruy-fr b38b8f51e2 FEAT: Add endpoint to fetch pipeline run jobs 2026-05-20 15:34:49 -03:00
Marcos Rodrigues Silva ea16e62d6b Merge pull request #489 from dadosfera/feature/pipeline-upgrade
FEAT: pipeline upgrade route
2026-05-11 12:58:06 -03:00
marcos-silva-rodrigues 6182705410 FEAT: pipeline upgrade route 2026-05-11 12:52:07 -03:00
21 changed files with 247 additions and 68 deletions
+6
View File
@@ -71,6 +71,11 @@ jobs:
sudo mv helmfile /usr/local/bin/ sudo mv helmfile /usr/local/bin/
helmfile --version helmfile --version
- name: Install Helm Diff plugin
run: |
helm plugin install https://github.com/databus23/helm-diff --version v3.9.3
helm diff version
- name: Debug Helm env - name: Debug Helm env
run: | run: |
helm env helm env
@@ -102,4 +107,5 @@ jobs:
- name: Run Helmfile Diff - name: Run Helmfile Diff
env: env:
ENV: ${{ needs.extract_environment.outputs.environment }} ENV: ${{ needs.extract_environment.outputs.environment }}
HELM_PLUGINS: /home/runner/.local/share/helm/plugins
run: helmfile -f deploy/helmfiles/${ENV}.yaml diff run: helmfile -f deploy/helmfiles/${ENV}.yaml diff
-1
View File
@@ -47,7 +47,6 @@ maestro:
open_customer_id: f239718a-a271-4ef9-ae7e-02a2f0f3aa6e open_customer_id: f239718a-a271-4ef9-ae7e-02a2f0f3aa6e
open_group_id: 401573bb-334f-44b2-b30e-88d4cea31ae9 open_group_id: 401573bb-334f-44b2-b30e-88d4cea31ae9
platform_api_url: https://oz8v2zid1e.execute-api.us-east-1.amazonaws.com platform_api_url: https://oz8v2zid1e.execute-api.us-east-1.amazonaws.com
connections_api_url: https://wv6fw7ayj4.execute-api.us-east-1.amazonaws.com
storage_explorer_api_url: "https://storage-explorer-{customer}.dadosfera.ai/api" storage_explorer_api_url: "https://storage-explorer-{customer}.dadosfera.ai/api"
dedicated_proxy: "" dedicated_proxy: ""
restricted_ip: "" restricted_ip: ""
+93 -2
View File
@@ -4574,6 +4574,7 @@
"get": { "get": {
"operationId": "PlatformApiController_getPipelineRunJobs", "operationId": "PlatformApiController_getPipelineRunJobs",
"summary": "Get pipeline run jobs", "summary": "Get pipeline run jobs",
"description": "Proxies platform-api DB-backed job runs and returns `{ jobs: [...] }`.",
"parameters": [ "parameters": [
{ {
"name": "pipelineId", "name": "pipelineId",
@@ -4594,11 +4595,22 @@
], ],
"responses": { "responses": {
"200": { "200": {
"description": "", "description": "DB-backed job runs for the selected pipeline run.",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object" "type": "object",
"properties": {
"jobs": {
"type": "array",
"items": {
"type": "object"
}
}
},
"required": [
"jobs"
]
} }
} }
} }
@@ -5526,6 +5538,48 @@
] ]
} }
}, },
"/catalog/custom-properties": {
"get": {
"operationId": "CatalogController_getCustomPropertyDefinitions",
"parameters": [
{
"name": "dadosfera-lang",
"in": "header",
"required": false,
"schema": {
"enum": [
"pt-br",
"en-us"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"tags": [
"Catalog"
],
"security": [
{
"access-token": []
},
{
"access-token": []
}
]
}
},
"/catalog/data-asset/{id}": { "/catalog/data-asset/{id}": {
"get": { "get": {
"operationId": "CatalogController_getDataAsset", "operationId": "CatalogController_getDataAsset",
@@ -11033,6 +11087,37 @@
"docs" "docs"
] ]
}, },
"CustomPropertyDto": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"number",
"date",
"boolean"
]
},
"color": {
"type": "string"
},
"emoji": {
"type": "string"
}
},
"required": [
"key",
"value",
"type"
]
},
"IUpdateDataRequest": { "IUpdateDataRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -11061,6 +11146,12 @@
}, },
"docs": { "docs": {
"type": "string" "type": "string"
},
"custom_properties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomPropertyDto"
}
} }
}, },
"required": [ "required": [
+4 -4
View File
@@ -16,7 +16,7 @@
"@aws-sdk/lib-dynamodb": "^3.414.0", "@aws-sdk/lib-dynamodb": "^3.414.0",
"@aws-sdk/signature-v4": "^3.370.0", "@aws-sdk/signature-v4": "^3.370.0",
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
"@dadosfera/protospack-v2": "^3.40.0-beta.10", "@dadosfera/protospack-v2": "^3.40.0-beta.14",
"@grpc/grpc-js": "^1.9.3", "@grpc/grpc-js": "^1.9.3",
"@grpc/proto-loader": "^0.7.9", "@grpc/proto-loader": "^0.7.9",
"@nestjs/cli": "^9.5.0", "@nestjs/cli": "^9.5.0",
@@ -1735,9 +1735,9 @@
} }
}, },
"node_modules/@dadosfera/protospack-v2": { "node_modules/@dadosfera/protospack-v2": {
"version": "3.40.0-beta.10", "version": "3.40.0-beta.14",
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.40.0-beta.10.tgz", "resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.40.0-beta.14.tgz",
"integrity": "sha512-F45dSEIKG+gwwDMYHayA242bFwhFTJbZm26KesQbGhf4I45ur6hYZD8dK0voNuVQInLMQhtm6+7th6/jJ8xpTQ==", "integrity": "sha512-pv3pxq0x1XcBgf3ajD6QOFRLOduh8iEozKFA3AKlIW4gid+gT4iL0GcU2M+O7h0QFeO4JIzRZe/nEMN82nqk7A==",
"dependencies": { "dependencies": {
"@grpc/grpc-js": "^1.9.3", "@grpc/grpc-js": "^1.9.3",
"rxjs": "^7.5.5" "rxjs": "^7.5.5"
+1 -1
View File
@@ -34,7 +34,7 @@
"@aws-sdk/lib-dynamodb": "^3.414.0", "@aws-sdk/lib-dynamodb": "^3.414.0",
"@aws-sdk/signature-v4": "^3.370.0", "@aws-sdk/signature-v4": "^3.370.0",
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4", "@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
"@dadosfera/protospack-v2": "^3.40.0-beta.10", "@dadosfera/protospack-v2": "^3.40.0-beta.14",
"@grpc/grpc-js": "^1.9.3", "@grpc/grpc-js": "^1.9.3",
"@grpc/proto-loader": "^0.7.9", "@grpc/proto-loader": "^0.7.9",
"@nestjs/cli": "^9.5.0", "@nestjs/cli": "^9.5.0",
+17
View File
@@ -271,6 +271,23 @@ export class CatalogController {
} }
@Get('custom-properties')
@RequireSomePermission(
PERMISSIONS_GROUPS.CATALOG.permissions.GET,
PERMISSIONS_GROUPS.CATALOG.permissions.DATA_MANAGER,
)
async getCustomPropertyDefinitions(@User() user: RequestUser) {
const { customer_id, customer_name, user_id, username } = user;
const metadata = PackTheMetadata({
customer_id,
customer_name,
user_id,
username,
});
return this.catalogService.getCustomPropertyDefinitions(metadata);
}
@Get('data-asset/:id') @Get('data-asset/:id')
@RequireSomePermission( @RequireSomePermission(
PERMISSIONS_GROUPS.CATALOG.permissions.GET, PERMISSIONS_GROUPS.CATALOG.permissions.GET,
+4
View File
@@ -120,6 +120,10 @@ class CatalogService implements OnModuleInit {
} }
} }
async getCustomPropertyDefinitions(metadata: Metadata) {
return lastValueFrom(this.catalogReadService.GetCustomPropertyDefinitions({}, metadata));
}
async createDataAsset(data: Messages.CreateDataAssetRequest, metadata) { async createDataAsset(data: Messages.CreateDataAssetRequest, metadata) {
this.logger.info('CatalogService - Manage Data assets permissions'); this.logger.info('CatalogService - Manage Data assets permissions');
if (!data.embed) data.embed = undefined; if (!data.embed) data.embed = undefined;
+29 -1
View File
@@ -1,5 +1,10 @@
import { ApiProperty, ApiPropertyOptional, PickType } from '@nestjs/swagger'; import { ApiProperty, ApiPropertyOptional, PickType } from '@nestjs/swagger';
import { IsEnum } from 'class-validator'; import {
IsEnum,
IsNotEmpty,
IsOptional,
IsString,
} from 'class-validator';
import { CreateDataAssetRequest } from '@dadosfera/protospack-v2/dist/lib/Catalog/interfaces/messages'; import { CreateDataAssetRequest } from '@dadosfera/protospack-v2/dist/lib/Catalog/interfaces/messages';
export enum DataAssetShareType { export enum DataAssetShareType {
@@ -198,6 +203,27 @@ export class IData {
day_opening: number; day_opening: number;
} }
export enum CustomPropertyType {
TEXT = 'text',
NUMBER = 'number',
DATE = 'date',
BOOLEAN = 'boolean',
}
export class CustomPropertyDto {
@ApiProperty()
key: string;
@ApiProperty()
value: string;
@ApiProperty({ enum: CustomPropertyType })
type: CustomPropertyType;
@ApiPropertyOptional()
color?: string;
@ApiPropertyOptional()
emoji?: string;
}
export class IUpdateDataRequest { export class IUpdateDataRequest {
@ApiProperty() @ApiProperty()
name: string; name: string;
@@ -211,6 +237,8 @@ export class IUpdateDataRequest {
share_type?: DataAssetShareType; share_type?: DataAssetShareType;
@ApiPropertyOptional() @ApiPropertyOptional()
docs?: string; docs?: string;
@ApiPropertyOptional({ type: [CustomPropertyDto] })
custom_properties?: CustomPropertyDto[];
} }
export class IUpdateCertificationStatusRequest { export class IUpdateCertificationStatusRequest {
@@ -6,9 +6,9 @@ import {
} from '@nestjs/microservices'; } from '@nestjs/microservices';
import { ConnectionTest } from '@dadosfera/protospack-v2'; import { ConnectionTest } from '@dadosfera/protospack-v2';
const infactoryUrl = process.env.INFACTORY_URL ?? '';
const isLocalConnection = const isLocalConnection =
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0'); process.env.INFACTORY_URL.startsWith('in-factory:') ||
process.env.INFACTORY_URL.includes('0.0.0.0');
export class ConnectionTestClientConfiguration { export class ConnectionTestClientConfiguration {
private config: GrpcOptions = { private config: GrpcOptions = {
+2 -2
View File
@@ -6,9 +6,9 @@ import {
} from '@nestjs/microservices'; } from '@nestjs/microservices';
import { ConnectionManager } from '@dadosfera/protospack-v2'; import { ConnectionManager } from '@dadosfera/protospack-v2';
const infactoryUrl = process.env.INFACTORY_URL ?? '';
const isLocalConnection = const isLocalConnection =
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0'); process.env.INFACTORY_URL.startsWith('in-factory:') ||
process.env.INFACTORY_URL.includes('0.0.0.0');
export class ConnectionClientConfiguration { export class ConnectionClientConfiguration {
public name = 'ConnectionClientConfiguration'; public name = 'ConnectionClientConfiguration';
+2 -2
View File
@@ -6,9 +6,9 @@ import {
} from '@nestjs/microservices'; } from '@nestjs/microservices';
import { ConnectorManager } from '@dadosfera/protospack-v2'; import { ConnectorManager } from '@dadosfera/protospack-v2';
const infactoryUrl = process.env.INFACTORY_URL ?? '';
const isLocalConnection = const isLocalConnection =
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0'); process.env.INFACTORY_URL.startsWith('in-factory:') ||
process.env.INFACTORY_URL.includes('0.0.0.0');
export class ConnectorClientConfiguration { export class ConnectorClientConfiguration {
public name = 'ConnectorClientConfiguration'; public name = 'ConnectorClientConfiguration';
+2 -2
View File
@@ -6,9 +6,9 @@ import {
type GrpcOptions, type GrpcOptions,
} from '@nestjs/microservices'; } from '@nestjs/microservices';
const infactoryUrl = process.env.INFACTORY_URL ?? '';
const isLocalConnection = const isLocalConnection =
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0'); process.env.INFACTORY_URL.startsWith('in-factory:') ||
process.env.INFACTORY_URL.includes('0.0.0.0');
export class InputsGrpcClient { export class InputsGrpcClient {
public readonly name = 'InputsGrpcClient'; public readonly name = 'InputsGrpcClient';
private config: GrpcOptions = { private config: GrpcOptions = {
+5 -4
View File
@@ -23,6 +23,7 @@ import {
} from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/messages'; } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/messages';
import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities'; import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities';
import { CreateInputReq } from './dtos/input.model'; import { CreateInputReq } from './dtos/input.model';
import { Metadata } from '@grpc/grpc-js';
@Injectable() @Injectable()
@@ -73,10 +74,10 @@ export class InputsService {
objectCamelToSnake(createInputResponse); objectCamelToSnake(createInputResponse);
return createInputResponse; return createInputResponse;
}, },
update: async (updateInputDTO: UpdateInputRequest): Promise<InputUpdateResponse> => { update: async (updateInputDTO: UpdateInputRequest, metadata: Metadata): Promise<InputUpdateResponse> => {
this.logger.info('InputClientService - Update' + JSON.stringify(updateInputDTO)); this.logger.info('InputClientService - Update' + JSON.stringify(updateInputDTO));
const updateInputResponse = await lastValueFrom( const updateInputResponse = await lastValueFrom(
this.inputWriteService.InputUpdate(updateInputDTO), this.inputWriteService.InputUpdate(updateInputDTO, metadata),
); );
return updateInputResponse; return updateInputResponse;
@@ -206,7 +207,7 @@ export class InputsService {
return findOneInputResponse; return findOneInputResponse;
} }
async update(id: string, data, info: Info) { async update(id: string, data, info: Info, metadata?: Metadata) {
// this.validateCron({ ...data, info }); // this.validateCron({ ...data, info });
try { try {
const { const {
@@ -217,7 +218,7 @@ export class InputsService {
id, id,
...data, ...data,
info, info,
}); }, metadata);
const updateInputResponse = this.adjustInputPayload( const updateInputResponse = this.adjustInputPayload(
input, input,
@@ -6,9 +6,9 @@ import {
} from '@nestjs/microservices'; } from '@nestjs/microservices';
import { NetworkConfig } from '@dadosfera/protospack-v2'; import { NetworkConfig } from '@dadosfera/protospack-v2';
const infactoryUrl = process.env.INFACTORY_URL ?? '';
const isLocalConnection = const isLocalConnection =
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0'); process.env.INFACTORY_URL.startsWith('in-factory:') ||
process.env.INFACTORY_URL.includes('0.0.0.0');
export class NetworkConfigGrpcClient { export class NetworkConfigGrpcClient {
public name = 'NetworkConfigGrpcClient'; public name = 'NetworkConfigGrpcClient';
@@ -317,7 +317,6 @@ export class PipelinesController {
) { ) {
this.logger.info('PipelinesController - update', { user }); this.logger.info('PipelinesController - update', { user });
const { customer_id, customer_name, user_id, username } = user;
const info: Info = { const info: Info = {
user_id: user.user_id, user_id: user.user_id,
customer: user.customer_name, customer: user.customer_name,
@@ -325,13 +324,7 @@ export class PipelinesController {
pipeline_id: pipelineId pipeline_id: pipelineId
}; };
const metadata = PackTheMetadata({ const metadata = PackTheMetadata(user);
customer_id,
customer_name,
user_id,
username,
language,
});
const response = await this.pipelinesClientService.updatePipelineInput( const response = await this.pipelinesClientService.updatePipelineInput(
pipelineId, pipelineId,
+30 -27
View File
@@ -383,7 +383,8 @@ export class PipelinesService implements OnModuleInit {
const updateInputResponse = await this.inputsService.update( const updateInputResponse = await this.inputsService.update(
inputId, inputId,
updateInputDTO, updateInputDTO,
info info,
metadata
); );
const inputRollback = () => { const inputRollback = () => {
@@ -404,34 +405,36 @@ export class PipelinesService implements OnModuleInit {
const nimbusUpdates = updateInputResponse?.tablesUpdate || []; const nimbusUpdates = updateInputResponse?.tablesUpdate || [];
nimbusUpdates.forEach(update => { if (user.customer_modules.includes('catalog')) {
const nimbusRollback = () => { nimbusUpdates.forEach(update => {
return this.nimbusService.renameTable( const nimbusRollback = () => {
info.customer, return this.nimbusService.renameTable(
update.database, info.customer,
{ update.database,
table_name: update.table_name, {
table_schema: update.table_schema table_name: update.table_name,
}, table_schema: update.table_schema
{ },
table_name: update.old_table_name, {
table_schema: update.old_table_schema table_name: update.old_table_name,
} table_schema: update.old_table_schema
); }
} );
rollback.push(nimbusRollback); }
}); rollback.push(nimbusRollback);
});
try { try {
await this.updateNimbus(info.customer, nimbusUpdates); await this.updateNimbus(info.customer, nimbusUpdates);
} catch (error) { } catch (error) {
this.logger.error(error); this.logger.error(error);
if (error instanceof AxiosError) { if (error instanceof AxiosError) {
this.logger.error(JSON.stringify(error.response.data)); this.logger.error(JSON.stringify(error.response.data));
} }
await this.executeRenameRollback(rollback); await this.executeRenameRollback(rollback);
throw new Error("Error Nimbus updating tables"); throw new Error("Error Nimbus updating tables");
}
} }
try { try {
@@ -14,7 +14,7 @@ import {
NotFoundException, NotFoundException,
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { ApiTags, ApiOperation } from '@nestjs/swagger'; import { ApiTags, ApiOperation, ApiOkResponse } from '@nestjs/swagger';
import { DadosferaLogger } from '@dadosfera/dadosfera-logs'; import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
import { import {
@@ -72,6 +72,10 @@ export class PlatformApiController {
return id?.replace(/-/g, '_') || ''; return id?.replace(/-/g, '_') || '';
} }
private decodePathParam(value: string): string {
return value ? decodeURIComponent(value) : '';
}
/** /**
* Denormalize ID back to UUID format (replace _ with -). * Denormalize ID back to UUID format (replace _ with -).
* Used when we receive a normalized ID but need the original UUID. * Used when we receive a normalized ID but need the original UUID.
@@ -832,6 +836,40 @@ export class PlatformApiController {
); );
} }
@Get('pipelines/:pipelineId/pipeline_run/:runId/jobs')
@ApiOperation({
summary: 'Get pipeline run jobs',
description: 'Proxies platform-api DB-backed job runs and returns `{ jobs: [...] }`.',
})
@ApiOkResponse({
description: 'DB-backed job runs for the selected pipeline run.',
schema: {
type: 'object',
properties: {
jobs: {
type: 'array',
items: { type: 'object' },
},
},
required: ['jobs'],
},
})
@RequireAllPermissions(PERMISSIONS_GROUPS.PIPELINE.permissions.GET)
async getPipelineRunJobs(
@Param('pipelineId') pipelineId: string,
@Param('runId') runId: string,
@User() user: RequestUser,
) {
const normalizedPipelineId = this.normalizePipelineId(pipelineId);
const decodedRunId = this.decodePathParam(runId);
return this.platformApiService.proxy(
'GET',
`/pipeline/${normalizedPipelineId}/pipeline_run/${decodedRunId}/jobs`,
user,
);
}
// ==================== JOBS - COLUMN EDITING ROUTES ==================== // ==================== JOBS - COLUMN EDITING ROUTES ====================
@Put('jobs/:jobId/input') @Put('jobs/:jobId/input')
@@ -1,7 +1,6 @@
import { Test, TestingModule } from '@nestjs/testing'; import { Test, TestingModule } from '@nestjs/testing';
import { ReleaseNoteController } from './release_note.controller'; import { ReleaseNoteController } from './release_note.controller';
import { ReleaseNoteService } from './release_note.service'; import { ReleaseNoteService } from './release_note.service';
import DadosferaLogger from '@dadosfera/dadosfera-logs';
describe('ReleaseNoteController', () => { describe('ReleaseNoteController', () => {
let controller: ReleaseNoteController; let controller: ReleaseNoteController;
@@ -9,7 +8,7 @@ describe('ReleaseNoteController', () => {
beforeEach(async () => { beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({ const module: TestingModule = await Test.createTestingModule({
controllers: [ReleaseNoteController], controllers: [ReleaseNoteController],
providers: [ReleaseNoteService, DadosferaLogger], providers: [ReleaseNoteService],
}).compile(); }).compile();
controller = module.get<ReleaseNoteController>(ReleaseNoteController); controller = module.get<ReleaseNoteController>(ReleaseNoteController);
@@ -1,13 +1,12 @@
import { Test, TestingModule } from '@nestjs/testing'; import { Test, TestingModule } from '@nestjs/testing';
import { ReleaseNoteService } from './release_note.service'; import { ReleaseNoteService } from './release_note.service';
import DadosferaLogger from '@dadosfera/dadosfera-logs';
describe('ReleaseNoteService', () => { describe('ReleaseNoteService', () => {
let service: ReleaseNoteService; let service: ReleaseNoteService;
beforeEach(async () => { beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({ const module: TestingModule = await Test.createTestingModule({
providers: [ReleaseNoteService, DadosferaLogger], providers: [ReleaseNoteService],
}).compile(); }).compile();
service = module.get<ReleaseNoteService>(ReleaseNoteService); service = module.get<ReleaseNoteService>(ReleaseNoteService);
@@ -6,9 +6,9 @@ import {
import { credentials } from '@grpc/grpc-js'; import { credentials } from '@grpc/grpc-js';
import { Transformation } from '@dadosfera/protospack-v2'; import { Transformation } from '@dadosfera/protospack-v2';
const infactoryUrl = process.env.INFACTORY_URL ?? '';
const isLocalConnection = const isLocalConnection =
infactoryUrl.startsWith('in-factory:') || infactoryUrl.includes('0.0.0.0'); process.env.INFACTORY_URL.startsWith('in-factory:') ||
process.env.INFACTORY_URL.includes('0.0.0.0');
export class TransformationsClientConfiguration { export class TransformationsClientConfiguration {
public name = 'TransformationsClientConfiguration'; public name = 'TransformationsClientConfiguration';
+1
View File
@@ -9,6 +9,7 @@ interface IMetadata {
details?: string; details?: string;
sensitive?: string; sensitive?: string;
roles?: string[]; roles?: string[];
customer_modules?: string[];
is_data_manager?: boolean; is_data_manager?: boolean;
access_token?: string; access_token?: string;
host?: string; host?: string;