4108-mdb_backend #987

Merged
juan merged 9 commits from 4108-mdb_backend into dev 2022-06-02 07:33:24 +00:00
Member
No description provided.
alexm added 2 commits 2022-05-27 08:18:35 +00:00
gitea/salix/pipeline/head This commit is unstable Details
79c42d04f9
feat(mdb): start section
gitea/salix/pipeline/head There was a failure building this commit Details
aa7074f303
test(mdb): back test
alexm added 2 commits 2022-05-27 11:39:46 +00:00
gitea/salix/pipeline/head This commit is unstable Details
1e2f827233
fix
alexm changed title from WIP: 4108-mdb_backend to 4108-mdb_backend 2022-05-30 06:33:32 +00:00
alexm requested review from juan 2022-05-30 06:33:47 +00:00
alexm changed title from 4108-mdb_backend to WIP: 4108-mdb_backend 2022-05-30 09:34:44 +00:00
alexm added 1 commit 2022-05-31 07:06:27 +00:00
gitea/salix/pipeline/head This commit is unstable Details
cac4e74793
refactor
alexm changed title from WIP: 4108-mdb_backend to 4108-mdb_backend 2022-05-31 07:13:03 +00:00
juan requested changes 2022-05-31 14:30:24 +00:00
@ -2580,0 +2591,4 @@
('com', 'test', '1'),
('eti', 'master', '1'),
('ser', 'test', '1'),
('lib', 'master', '1');
Owner

Per a fixtures, deixa 2 registres en esta taula, uno amb test i un altre amb master. Quantes menys dades tingam en fixtures millor.

Per a fixtures, deixa 2 registres en esta taula, uno amb test i un altre amb master. Quantes menys dades tingam en fixtures millor.
alexm marked this conversation as resolved
@ -101,0 +104,4 @@
"connector": "loopback-component-storage",
"provider": "filesystem",
"root": "./storage/access",
"maxFileSize": "2621440000",
Owner

Fica màxim 500MB, crec que el valor està en bytes, comprova-ho en la documentació de looback storage.

Fica màxim 500MB, crec que el valor està en bytes, comprova-ho en la documentació de looback storage.
alexm marked this conversation as resolved
@ -0,0 +65,4 @@
const accessContainer = await AccessContainer.container(branch);
const destinationFile = path.join(accessContainer.client.root, branch, `${appName}${newVersion}.7z`);
await fs.move(srcFile, destinationFile, {
Owner

Cuando NODE_ENV es test no hay que guardar el fichero, si no sobreescribira el de producción. Añadir un if para evitar el guardado en ese caso.

Cuando `NODE_ENV` es `test` no hay que guardar el fichero, si no sobreescribira el de producción. Añadir un if para evitar el guardado en ese caso.
juan marked this conversation as resolved
@ -0,0 +69,4 @@
accessContainer.client.root, accessContainer.name, appName, `${newVersion}.7z`);
if (process.env.NODE_ENV == 'test') {
try {
Owner

Lleva el try/catch, si intenta borrar el fitxer i no pot, ha de tornar el error.

Lleva el try/catch, si intenta borrar el fitxer i no pot, ha de tornar el error.
alexm marked this conversation as resolved
@ -0,0 +78,4 @@
});
await fs.chmod(destinationFile, 0o644);
const branchPath = path.join(accessContainer.client.root, 'branches', branch);
Owner

Abans de crear el directori, comprovar que la rama existeix en la taula mdbBranch, en cas contrari llançar un error notificant que la rama no existeix

Abans de crear el directori, comprovar que la rama existeix en la taula mdbBranch, en cas contrari llançar un error notificant que la rama no existeix
alexm marked this conversation as resolved
@ -0,0 +84,4 @@
const destinationBranch = path.join(branchPath, `${appName}.7z`);
const destinationRoot = path.join(accessContainer.client.root, `${appName}.7z`);
try {
await fs.unlink(destinationBranch);
Owner

Es necesari borrarlo primer? fs.symlink no el reescriu si existeix?

Es necesari borrarlo primer? fs.symlink no el reescriu si existeix?
alexm marked this conversation as resolved
@ -0,0 +90,4 @@
if (branch == 'master') {
try {
await fs.unlink(destinationRoot);
Owner

Es necesari borrarlo primer? fs.symlink no el reescriu si existeix?

Es necesari borrarlo primer? fs.symlink no el reescriu si existeix?
alexm marked this conversation as resolved
@ -0,0 +103,4 @@
}
}, myOptions);
if (!version) {
Owner

Pots gastar upsert, aixina en menys codi insertes (si no existeix) o actualitzes.

https://loopback.io/doc/en/lb3/Creating-updating-and-deleting-data.html

Pots gastar upsert, aixina en menys codi insertes (si no existeix) o actualitzes. https://loopback.io/doc/en/lb3/Creating-updating-and-deleting-data.html
alexm marked this conversation as resolved
alexm added 1 commit 2022-06-01 05:57:42 +00:00
gitea/salix/pipeline/head This commit is unstable Details
8340041b33
throw userError and maxFileSize
alexm requested review from juan 2022-06-01 06:13:14 +00:00
juan approved these changes 2022-06-01 06:57:26 +00:00
juan added 1 commit 2022-06-02 06:45:59 +00:00
gitea/salix/pipeline/head This commit is unstable Details
ea0a43d0fb
Merge branch 'dev' into 4108-mdb_backend
alexm added 1 commit 2022-06-02 06:53:08 +00:00
gitea/salix/pipeline/head This commit is unstable Details
13c558e526
add folder storage/access
alexm added 1 commit 2022-06-02 07:01:45 +00:00
gitea/salix/pipeline/head This commit looks good Details
9a25bdad06
relaunch tests
juan approved these changes 2022-06-02 07:29:46 +00:00
juan approved these changes 2022-06-02 07:30:21 +00:00
juan merged commit ddca6713c9 into dev 2022-06-02 07:33:24 +00:00
juan deleted branch 4108-mdb_backend 2022-06-02 07:34:13 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#987
No description provided.