Skip to content

Commit

Permalink
Merge branch 'main' into EW-1061
Browse files Browse the repository at this point in the history
  • Loading branch information
psachmann committed Dec 17, 2024
2 parents a050214 + b9b08d0 commit 7ec329b
Show file tree
Hide file tree
Showing 560 changed files with 14,702 additions and 10,669 deletions.
10 changes: 0 additions & 10 deletions .codacy.yml

This file was deleted.

129 changes: 126 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ module.exports = {
'arrow-parens': ['error', 'always'],
'arrow-body-style': ['error', 'as-needed', { requireReturnForObjectLiteral: true }],
'no-only-tests/no-only-tests': 'error',
'max-classes-per-file': ['warn', 1],
},
plugins: ['import', 'prettier', 'promise', 'no-only-tests'],
plugins: ['import', 'prettier', 'promise', 'no-only-tests', 'filename-rules'],
env: {
node: true,
mocha: true,
Expand Down Expand Up @@ -88,11 +89,27 @@ module.exports = {
'import/no-extraneous-dependencies': 'off', // better handles by ts resolver
'import/prefer-default-export': 'off',
'no-void': ['error', { allowAsStatement: true }],
'max-classes-per-file': 'off',
'class-methods-use-this': 'off',
'no-param-reassign': 'off',
'no-underscore-dangle': 'off',
'filename-rules/match': [1, 'kebabcase'],
'require-await': 'warn',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/explicit-member-accessibility': [
'warn',
{
accessibility: 'explicit',
overrides: {
accessors: 'no-public',
constructors: 'no-public',
methods: 'explicit',
properties: 'explicit',
parameterProperties: 'explicit',
},
},
],
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-empty-interface': [
'error',
Expand All @@ -105,7 +122,11 @@ module.exports = {
{
patterns: [
{
group: ['@infra/*/*', '@modules/*/*', '!*.module'],
group: ['@src/apps/**', '@src/core/**', '@src/modules/*/*', '@src/shared/**'],
message: 'Remove src/ from import path',
},
{
group: ['@infra/*/*', '@modules/*/*', '!@modules/*/testing', '!*.module'],
message: 'Do not deep import from a module',
},
],
Expand All @@ -122,7 +143,109 @@ module.exports = {
rules: {
// you should turn the original rule off *only* for test files
'@typescript-eslint/unbound-method': 'off',
'jest/prefer-spy-on': 'warn',
'jest/unbound-method': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'max-classes-per-file': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
},
},
{
files: ['apps/server/src/apps/**/*.ts'],
rules: {
'@typescript-eslint/no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['@apps/**', '@infra/**', '@shared/**'],
message: 'apps-modules may NOT import from @apps, @infra or @shared',
},
],
},
],
},
},
{
files: ['apps/server/src/core/**/*.ts'],
rules: {
'@typescript-eslint/no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['@apps/**', '@core/**', '@infra/**', '@modules/**'],
message: 'core-modules may NOT import from @apps, @core, @infra or @modules',
},
],
},
],
},
},
{
files: ['apps/server/src/infra/**/*.ts'],
rules: {
'@typescript-eslint/no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['@apps/**', '@core/**', '@modules/**'],
message: 'infra-modules may NOT import from @apps, @core or @modules',
},
],
},
],
},
},
{
files: ['apps/server/src/modules/**/*.ts'],
rules: {
'@typescript-eslint/no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['@apps/**'],
message: 'modules-modules may NOT import from @apps',
},
],
},
],
},
},
{
files: ['apps/server/src/shared/**/*.ts'],
rules: {
'@typescript-eslint/no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['@apps/**', '@core/**', '@infra/**', '@modules/**', '@shared/**'],
message: 'shared modules may NOT import from @apps, @core, @infra, @modules or @shared',
},
],
},
],
},
},
{
files: ['apps/server/src/**/*.entity.ts'],
rules: {
'@typescript-eslint/explicit-member-accessibility': [
'warn',
{
accessibility: 'explicit',
overrides: {
accessors: 'no-public',
constructors: 'no-public',
methods: 'explicit',
properties: 'no-public',
parameterProperties: 'explicit',
},
},
],
},
},
],
Expand Down
38 changes: 4 additions & 34 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Description
<!--
This is a template to add as many information as possible to the pull request, to help reviewer and as a checklist for you. Points to remember are set in the comments, please read and keep them in mind:
This is a template to add as much information as possible to the pull request, to help reviewer and as a checklist for you. Points to remember are set in the comments, please read and keep them in mind:
- Code should be self-explanatory and share your knowledge with others
- Document code that is not self-explanatory
- Think about bugs and keep security in mind
- Write tests (Unit and Integration), also for error cases
- Main logic should hidden behind the api, never trust the client
- Visible changes should be discussed with the UX-Team from the begining of development; they also have to accept them at the end
- Keep the changelog up-to-date
- Main logic should be hidden behind the api, never trust the client
- Visible changes should be discussed with the UX-Team from the beginning of development; they also have to accept them at the end
- Leave the code cleaner than you found it. Remove unnecessary lines. Listen to the linter.
-->

Expand All @@ -19,45 +18,16 @@ Base links to copy
- https://ticketsystem.dbildungscloud.de/browse/BC-????
-->

## Changes
<!--
## Changes
What will the PR change?
Why are the changes required?
Short notice if a ticket exists, more detailed if not
-->

## Datasecurity
<!--
Notice about:
- model changes
- logging of user data
- right changes
- and other user data stuff
If you are not sure if it is relevant, take a look at confluence or ask the data-security team.
-->

## Deployment
<!--
Keep in mind to changes to seed data, if changes are done by migration scripts.
Changes to the infrastructure have to be discussed with the devops
This point should includes following information:
- What is required for deployment?
- Environment variables like FEATURE_XY=true
- Migration scripts to run, other requirements
-->

## New Repos, NPM pakages or vendor scripts
<!--
Keep in mind the stability, performance, activity and author.
Describe why it is needed.
-->

## Approval for review

- [ ] DEV: If api was changed - `generate-client:server` was executed in vue frontend and changes were tested and put in a PR with the same branch name.
- [ ] QA: In addition to review, the code has been manually tested (if manual testing is possible)
- [ ] All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

> Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.
1 change: 0 additions & 1 deletion .github/autolabeler.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .nodemon.json

This file was deleted.

9 changes: 0 additions & 9 deletions SECURITY.md

This file was deleted.

91 changes: 0 additions & 91 deletions ansible/roles/schulcloud-server-core/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,28 +214,6 @@
tags:
- ingress


- name: remove old tldraw migration Job
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
api_version: batch/v1
kind: Job
name: tldraw-migration-job
state: absent
wait: yes
tags:
- job

- name: tldraw migration Job
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-migration-job.yml.j2
when: WITH_TLDRAW2 is defined and WITH_TLDRAW2|bool
tags:
- job

- name: Delete Files CronJob
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
Expand All @@ -244,15 +222,6 @@
tags:
- cronjob

- name: Delete Tldraw Files CronJob
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-delete-files-cronjob.yml.j2
state: "{{ 'present' if WITH_TLDRAW else 'absent'}}"
tags:
- cronjob

- name: Data deletion trigger CronJob
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
Expand Down Expand Up @@ -371,66 +340,6 @@
tags:
- prometheus

- name: External Secret for TlDraw Server
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-server-external-secret.yml.j2
state: "{{ 'present' if WITH_BRANCH_MONGO_DB_MANAGEMENT is defined and WITH_BRANCH_MONGO_DB_MANAGEMENT|bool else 'absent'}}"
when:
- EXTERNAL_SECRETS_OPERATOR is defined and EXTERNAL_SECRETS_OPERATOR|bool
- WITH_TLDRAW is defined and WITH_TLDRAW|bool
tags:
- 1password

- name: TlDraw server Secret (from 1Password)
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-server-onepassword.yml.j2
when:
- ONEPASSWORD_OPERATOR is defined and ONEPASSWORD_OPERATOR|bool
- WITH_TLDRAW is defined and WITH_TLDRAW|bool
tags:
- 1password

- name: TlDraw server deployment
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-deployment.yml.j2
state: "{{ 'present' if WITH_TLDRAW else 'absent'}}"
tags:
- deployment

- name: TlDraw server service
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-server-svc.yml.j2
when: WITH_TLDRAW is defined and WITH_TLDRAW|bool
tags:
- service

- name: Tldraw ingress
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-ingress.yml.j2
apply: yes
when: WITH_TLDRAW is defined and WITH_TLDRAW|bool
tags:
- ingress

- name: TldrawServiceMonitor
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: tldraw-svc-monitor.yml.j2
state: "{{ 'present' if WITH_TLDRAW else 'absent'}}"
tags:
- prometheus

- name: BoardCollaboration configmap
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ spec:
data:
DB_URL: "{{ '{{ .MONGO_MANAGEMENT_TEMPLATE_URL }}/' ~ MONGO_MANAGEMENT_PREFIX ~ 'scapp' ~ MONGO_MANAGEMENT_POSTFIX }}"
DATABASE__URL: "{{ '{{ .MONGO_MANAGEMENT_TEMPLATE_URL }}/' ~ MONGO_MANAGEMENT_PREFIX ~ 'scapp' ~ MONGO_MANAGEMENT_POSTFIX }}"
TLDRAW_DB_URL: "{{ '{{ .MONGO_MANAGEMENT_TEMPLATE_URL }}/' ~ MONGO_MANAGEMENT_PREFIX ~ 'tldraw' ~ MONGO_MANAGEMENT_POSTFIX }}"
dataFrom:
- extract:
key: api-secret{{ EXTERNAL_SECRETS_POSTFIX }}
Expand Down
Loading

0 comments on commit 7ec329b

Please sign in to comment.