Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pull main into develop post release v1.77.1 #3714

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.77.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.77.0...v1.77.1) (2024-09-05)


### Bug Fixes

* add namespace and cluster labels to python transformation functions ([255f3e5](https://github.com/rudderlabs/rudder-transformer/commit/255f3e52fb66ae6cb55e24938fff60ec6e28b285))

## [1.77.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.76.1...v1.77.0) (2024-09-02)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-transformer",
"version": "1.77.0",
"version": "1.77.1",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
4 changes: 4 additions & 0 deletions src/util/customTransformer-faas.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const {
executeFaasFunction,
FAAS_AST_FN_NAME,
FAAS_AST_VID,
PARENT_NAMESPACE,
PARENT_CLUSTER,
} = require('./openfaas');
const { getLibraryCodeV1 } = require('./customTransforrmationsStore-v1');

Expand All @@ -26,6 +28,8 @@ function generateFunctionName(userTransformation, libraryVersionIds, testMode, h
(libraryVersionIds || []).sort(),
);

ids = ids.concat([PARENT_NAMESPACE, PARENT_CLUSTER]);

if (hashSecret !== '') {
ids = ids.concat([hashSecret]);
}
Expand Down
7 changes: 7 additions & 0 deletions src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const FAAS_READINESS_HTTP_FAILURE_THRESHOLD =
const FAAS_READINESS_HTTP_SUCCESS_THRESHOLD =
process.env.FAAS_READINESS_HTTP_SUCCESS_THRESHOLD || '1';

const PARENT_NAMESPACE = process.env.NAMESPACE || 'default';
const PARENT_CLUSTER = process.env.FAAS_FN_PARENT_CLUSTER || 'default';

const CONFIG_BACKEND_URL = process.env.CONFIG_BACKEND_URL || 'https://api.rudderlabs.com';
const GEOLOCATION_URL = process.env.GEOLOCATION_URL || '';
const FAAS_AST_VID = 'ast';
Expand Down Expand Up @@ -313,6 +316,8 @@ function buildOpenfaasFn(name, code, versionId, libraryVersionIDs, testMode, trM
const labels = {
'openfaas-fn': 'true',
'parent-component': 'openfaas',
'parent-namespace': PARENT_NAMESPACE,
'parent-cluster': PARENT_CLUSTER,
'com.openfaas.scale.max': FAAS_MAX_PODS_IN_TEXT,
'com.openfaas.scale.min': FAAS_MIN_PODS_IN_TEXT,
'com.openfaas.scale.zero': FAAS_SCALE_ZERO,
Expand Down Expand Up @@ -431,6 +436,8 @@ module.exports = {
buildOpenfaasFn,
FAAS_AST_VID,
FAAS_AST_FN_NAME,
PARENT_NAMESPACE,
PARENT_CLUSTER,
setFunctionInCache,
reconcileFunction,
};
3 changes: 2 additions & 1 deletion test/__tests__/user_transformation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const pyLibCode = (name, versionId) => {

const pyfaasFuncName = (workspaceId, versionId, libraryVersionIds=[], hashSecret="") => {
let ids = [workspaceId, versionId].concat(libraryVersionIds.sort());
ids = ids.concat(["default", "default"]);
if (hashSecret !== "") {
ids = ids.concat([hashSecret]);
}
Expand Down Expand Up @@ -119,7 +120,7 @@ describe("User transformation utils", () => {
[],
false,
'hash-secret');
expect(fnName).toEqual('fn-workspaceid-34a32ade07ebbc7bc5ea795b8200de9f');
expect(fnName).toEqual('fn-workspaceid-91d66b4cea6f0ed16cd41258d138d0a8');
});

});
Expand Down
Loading