Skip to content

Commit 6a46480

Browse files
authored
Merge pull request #492 from fractal-analytics-platform/log4js
Added backend logging using Log4js
2 parents fcc250e + 7475640 commit 6a46480

File tree

82 files changed

+1173
-640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1173
-640
lines changed

.env

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ AUTH_COOKIE_SECURE=false
66
# remember to set this in production
77
AUTH_COOKIE_DOMAIN=
88
AUTH_COOKIE_PATH=/
9-
AUTH_COOKIE_MAX_AGE=1800
109
AUTH_COOKIE_SAME_SITE=lax
11-
AUTH_COOKIE_HTTP_ONLY=true
1210

1311
# PUBLIC VARIABLES (accessible from client side)
1412
PUBLIC_FRACTAL_ADMIN_SUPPORT_EMAIL=help@localhost
1513
PUBLIC_UPDATE_JOBS_INTERVAL=3000
1614
PUBLIC_OAUTH_CLIENT_NAME=
15+
16+
# Logging
17+
LOG_FILE=/tmp/fractal-web.log
18+
LOG_LEVEL_FILE=info
19+
LOG_LEVEL_CONSOLE=warn

.env.development

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ AUTH_COOKIE_NAME=fastapiusersauth
55
AUTH_COOKIE_SECURE=false
66
AUTH_COOKIE_DOMAIN=
77
AUTH_COOKIE_PATH=/
8-
AUTH_COOKIE_MAX_AGE=86400
98
AUTH_COOKIE_SAME_SITE=lax
10-
AUTH_COOKIE_HTTP_ONLY=true
119

1210
# PUBLIC VARIABLES (accessible from client side)
1311
PUBLIC_FRACTAL_ADMIN_SUPPORT_EMAIL=help@localhost
1412
PUBLIC_UPDATE_JOBS_INTERVAL=3000
1513
PUBLIC_OAUTH_CLIENT_NAME=
14+
15+
# Logging
16+
LOG_FILE=./fractal-web.log
17+
LOG_LEVEL_FILE=debug
18+
LOG_LEVEL_CONSOLE=info

.github/workflows/end_to_end_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/checkout@v4
3636

3737
- name: Set up node
38-
uses: actions/setup-node@v3
38+
uses: actions/setup-node@v4
3939
with:
4040
node-version: ${{ matrix.node-version }}
4141
cache: npm

.github/workflows/github_release.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,45 @@ on:
44
tags:
55
- 'v[0-9]+.[0-9]+.[0-9]+'
66
- 'v[0-9]+.[0-9]+.[0-9]+[a-c][0-9]+'
7+
- 'v[0-9]+.[0-9]+.[0-9]+-[a-c][0-9]+'
78
- 'v[0-9]+.[0-9]+.[0-9]+alpha[0-9]+'
89
- 'v[0-9]+.[0-9]+.[0-9]+beta[0-9]+'
910
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
1011

1112
jobs:
1213
build:
1314
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: ['16', '18', '20']
19+
1420
steps:
1521
- name: Checkout
1622
uses: actions/checkout@v4
23+
24+
- name: Set up node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm install
32+
33+
- name: Generate build artifacts
34+
run: npm run build
35+
36+
- name: Generate the package
37+
run: npm pack
38+
39+
- name: Extract the package
40+
run: tar -xzf fractal-web-*.tgz
41+
42+
- name: Repack the package removing parent folder
43+
run: tar -C package -czf node-${{ matrix.node-version }}-fractal-web-${{ github.ref_name }}.tar.gz build package.json node_modules LICENSE
44+
1745
- name: Release
18-
uses: softprops/action-gh-release@v1
46+
uses: softprops/action-gh-release@v2
47+
with:
48+
files: node-${{ matrix.node-version }}-fractal-web-${{ github.ref_name }}.tar.gz

.github/workflows/lint_and_build.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222

2323
- name: Set up node
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727
cache: npm
@@ -39,9 +39,7 @@ jobs:
3939
AUTH_COOKIE_SECURE: false
4040
AUTH_COOKIE_DOMAIN:
4141
AUTH_COOKIE_PATH: /
42-
AUTH_COOKIE_MAX_AGE: 1800
4342
AUTH_COOKIE_SAME_SITE: lax
44-
AUTH_COOKIE_HTTP_ONLY: true
4543
PUBLIC_OAUTH_CLIENT_NAME:
4644
PUBLIC_FRACTAL_ADMIN_SUPPORT_EMAIL:
4745
run: npm run build

.github/workflows/unit_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222

2323
- name: Set up node
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: ${{ matrix.node-version }}
2727
cache: npm

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ coverage*/
1414
playwright-report/
1515
venv
1616
site
17+
*.log
18+
test-results/

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
# Unreleased
44

5+
Note: with this release all the environment variables will be read from the environment, when the service is started, not during build time. Remember to load in your environment all the variables that you need when you start the service in production. This will not affect development setup.
6+
7+
* Updated quickstart documenting the changes related to environment variables (\#492).
8+
* Fixed bug in default dataset selection when job references a deleted dataset (\#492).
9+
* Fixed v1 workflow task version update bug (\#492).
10+
* Added `npm pack` artifacts to files published by the CI during the release (\#492).
11+
* Fixed v2 admin job download link (\#492).
12+
* Imported all the environment variables dynamically (\#492).
13+
* Added backend logging using Log4js (\#492).
514
* Improved JSON Schema Sandbox page (\#490).
615

716
# 1.0.4

__tests__/v2/workflow_utilities.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,15 @@ describe('Workflow Utilities', () => {
7272
// return default dataset
7373
expect(datasetId).toEqual(3);
7474
});
75+
76+
it('Handles jobs with deleted datasets', () => {
77+
const id = getDefaultWorkflowDataset(
78+
[],
79+
[
80+
{ start_timestamp: '2024-04-24T15:18:37.868655+00:00', dataset_id: null },
81+
{ start_timestamp: '2024-04-24T10:18:37.868655+00:00', dataset_id: 1 }
82+
]
83+
);
84+
expect(id).toEqual(1);
85+
});
7586
});

docs/development/dependencies.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)