From d148b6e64bd4cf4592e03406f1fdfb4d2584e2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Wed, 4 Dec 2024 12:15:20 +0100 Subject: [PATCH 01/19] updated info and link to readme --- README.md | 38 +------------------ migrations/README | 95 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index f5be819d3..ab4da964f 100644 --- a/README.md +++ b/README.md @@ -177,43 +177,7 @@ All have the password: `password` If you modify the database models (e.g. tables or indexes), you must create a migration for the changes. We use `Alembic` (via `flask-migrate`) which compares our database models with the running database to generate a suggested migration. -The new migration can be autogenerated in two main ways: - -1. Make sure the development setup is running (`docker-compose up`) while doing the changes. - -2. Reset the container using `docker-compose down` and then remove `flask init-db $$DB_TYPE &&` in `docker-compose.yml`. It will prevent the population of the database, allowing you to install the old schema and build your migration on top of it by running `docker-compose up` - -To create the migration, run the command `flask db migrate -m ` in the running backend: - -```bash -docker exec dds_backend flask db migrate -m -``` - -This will create a migration in the folder `migrations/versions`. Confirm that the changes in the file match the changes you did, otherwise change the `upgrade` and `downgrade` functions as needed. Keep an eye out for changes to the `apscheduler` tables and indexes, and make sure they are not included in the migration. Once the migration looks ok, test it by running `flask db upgrade` in the backend: - -```bash -docker exec dds_backend flask db upgrade -``` - -Finally, confirm that the database looks correct after running the migration and commit the migration file to git. Note that you need to run `black` on the generated migration file. - -> ↩️ If you want to start over, restore the content of `migrations/versions` (remove new files, run `git restore` on the folder) and start from autogeneration method 2. - -### Database issues while running `docker-compose up` - -If you run into issues with complaints about the db while running `docker-compose up` you can try to reset the containers by running `docker-compose down` before trying again. If you still have issues, try cleaning up containers and volumes manually. - -> ⚠️ These commands will remove _all_ containers and volumes! -> If you are working on other projects please be more selective. - -```bash -docker rm $(docker ps -a -q) -f -docker volume prune -``` - -Then run `docker-compose up` as normal. The images will be rebuilt from scratch before launch. - -If there are still issues, try deleting the `pycache` folders and repeat the above steps. +For instructions on how to do this, see [the README in the migrations directory](./migrations/README). ## Run tests diff --git a/migrations/README b/migrations/README index 0e0484415..69ee057c9 100644 --- a/migrations/README +++ b/migrations/README @@ -1 +1,94 @@ -Single-database configuration for Flask. +# Database Migration Guide + +If you modify the database models (e.g. tables or indexes), you must create a migration for the changes. We use `Alembic` (via `flask-migrate`) which compares our database models with the running database to generate a suggested migration. + +This document explains how to generating new database migration. + +## Steps for Generating Migrations + +The new migration can be autogenerated in _two main ways_. Method 1 below should be used as the default, and Method 2 should be used in order to start over, e.g. in the case of something going wrong. + +### Method 1 + +1. Make sure the development setup is running (`docker-compose up`) while doing the changes. +2. To create the migration, do **one of the following points**. This will create a migration in the folder `migrations/versions`. + + - Enter the container (`docker exec -it dds_backend /bin/sh`) and generate the migration (`flask db migrate -m `) + - Run the following command (outside of the container): `docker exec dds_backend flask db migrate -m ` + +3. Confirm that the changes in the file match the changes you did, otherwise change the `upgrade` and `downgrade` functions as needed. + + > NB! Keep an eye out for changes to the `apscheduler` tables and indexes, and **make sure they are not included in the migration**. + +4. Once the migration looks ok, test it by running `flask db upgrade` in the backend, either by first entering the container (see first point under step 2 above) or by running the following (outside of the container): `docker exec dds_backend flask db upgrade` + +5. Finally, confirm that the database looks correct after running the migration and commit the migration file to git. + + > Note that you need to run `black` on the generated migration file. + +### Method 2 + +If you want to start over, e.g. if something went wrong when going through method 1: + +1. Restore the content of `migrations/versions`: + + a) Remove the new migrations file(s) + b) Run `git restore` on the `migrations/versions` folder + +2. Reset the container: `docker-compose down` +3. Remove `flask init-db $$DB_TYPE &&` in the `docker-compose.yml` file. This will prevent the population of the database and instead allow the install of the old schema. +4. Start the container again: `docker-compose up` +5. Follow Method 1 + +## Database issues while running `docker-compose up` + +If you run into issues with complaints about the db while running `docker-compose up` you can try to reset the containers by running `docker-compose down` before trying again. If you still have issues, try cleaning up containers and volumes manually. + +> ⚠️ These commands will remove _all_ containers and volumes! +> If you are working on other projects please be more selective. + +```bash +docker rm $(docker ps -a -q) -f +docker volume prune +``` + +Then run `docker-compose up` as normal. The images will be rebuilt from scratch before launch. + +If there are still issues, try deleting the `pycache` folders and repeat the above steps. + + +THE TEXT BELOW IS WHAT ALVARO WROTE. I WILL BE ADDING PARTS OF IT INTO THE TEXT ABOVE. + +### 1. Start the Containers + +Before making any model changes, ensure the containers are running locally. + +### 2. Modify the Database Models + +Edit the `models.py` file to reflect the changes you need. This might include: + +- Adding new tables or columns +- Modifying existing fields +- Deleting tables or columns + +### 3. Access the Backend Container + +Connect a terminal into the backend container. + +### 4. Run the Migration Command + +Inside the container, execute the migration command: + +```bash +flask db migrate -m "Your migration message" +``` + +### 5. Review the Generated Migration File + +A new migration script will be generated in the `migrations/versions` directory. **Review this file carefully** to ensure it correctly represents your intended changes. + +For reference on available operations and customization options, check the [Alembic Documentation](https://alembic.sqlalchemy.org/en/latest/ops.html). + +### 6. Commit the Migration File + +Finally, commit the migration script to version control. From 2f54be512491e3b1bbb68a3c7ab70047f242e064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 09:41:48 +0100 Subject: [PATCH 02/19] linkspector --- .github/workflows/lincspector..yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/lincspector..yml diff --git a/.github/workflows/lincspector..yml b/.github/workflows/lincspector..yml new file mode 100644 index 000000000..abd6b8ee1 --- /dev/null +++ b/.github/workflows/lincspector..yml @@ -0,0 +1,15 @@ +name: Linkspector +on: [pull_request] +jobs: + check-links: + name: runner / linkspector + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run linkspector + uses: umbrelladocs/action-linkspector@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true + filter_mode: nofilter \ No newline at end of file From 18ab24b00c16d1d842dfe2efa9dc13d46755a1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 09:44:34 +0100 Subject: [PATCH 03/19] linkspector --- .github/workflows/lincspector..yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/workflows/lincspector..yml diff --git a/.github/workflows/lincspector..yml b/.github/workflows/lincspector..yml deleted file mode 100644 index abd6b8ee1..000000000 --- a/.github/workflows/lincspector..yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Linkspector -on: [pull_request] -jobs: - check-links: - name: runner / linkspector - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run linkspector - uses: umbrelladocs/action-linkspector@v1 - with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - fail_on_error: true - filter_mode: nofilter \ No newline at end of file From b4d3542ffb217f806ef7f7e1b1801ed7fb772c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:00:35 +0100 Subject: [PATCH 04/19] linkspector --- .github/workflows/linkspector.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/linkspector.yml diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml new file mode 100644 index 000000000..3257a345f --- /dev/null +++ b/.github/workflows/linkspector.yml @@ -0,0 +1,14 @@ +name: Linkspector +on: [pull_request] +jobs: + check-links: + name: runner / linkspector + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run linkspector + uses: umbrelladocs/action-linkspector@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + filter_mode: file \ No newline at end of file From 55fc9a60b8b0044e2c791ef1605cce85882cd981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:02:12 +0100 Subject: [PATCH 05/19] forgot suffix on md file --- migrations/{README => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename migrations/{README => README.md} (100%) diff --git a/migrations/README b/migrations/README.md similarity index 100% rename from migrations/README rename to migrations/README.md From 3d4203ef44b6bc168dd9e523f87f90b156c92222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:03:10 +0100 Subject: [PATCH 06/19] new line at end of file --- .github/workflows/linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index 3257a345f..f64291e03 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -11,4 +11,4 @@ jobs: with: github_token: ${{ secrets.github_token }} reporter: github-pr-review - filter_mode: file \ No newline at end of file + filter_mode: file From 02ab679e64969d0ff53bc0218dfe5a5a8e4ba8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:34:37 +0100 Subject: [PATCH 07/19] updated readme --- migrations/README.md | 128 ++++++++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 55 deletions(-) diff --git a/migrations/README.md b/migrations/README.md index 69ee057c9..cba7f099d 100644 --- a/migrations/README.md +++ b/migrations/README.md @@ -1,94 +1,112 @@ -# Database Migration Guide +# Making database changes - Adding a new migration If you modify the database models (e.g. tables or indexes), you must create a migration for the changes. We use `Alembic` (via `flask-migrate`) which compares our database models with the running database to generate a suggested migration. -This document explains how to generating new database migration. +This document explains how to generate new database migration. ## Steps for Generating Migrations -The new migration can be autogenerated in _two main ways_. Method 1 below should be used as the default, and Method 2 should be used in order to start over, e.g. in the case of something going wrong. +### 1. Start the Containers -### Method 1 +Before making any changes to the database models, ensure the containers are running locally. -1. Make sure the development setup is running (`docker-compose up`) while doing the changes. -2. To create the migration, do **one of the following points**. This will create a migration in the folder `migrations/versions`. - - - Enter the container (`docker exec -it dds_backend /bin/sh`) and generate the migration (`flask db migrate -m `) - - Run the following command (outside of the container): `docker exec dds_backend flask db migrate -m ` +```bash +docker compose up # See root README for information regarding the different profiles +``` -3. Confirm that the changes in the file match the changes you did, otherwise change the `upgrade` and `downgrade` functions as needed. - - > NB! Keep an eye out for changes to the `apscheduler` tables and indexes, and **make sure they are not included in the migration**. - -4. Once the migration looks ok, test it by running `flask db upgrade` in the backend, either by first entering the container (see first point under step 2 above) or by running the following (outside of the container): `docker exec dds_backend flask db upgrade` +### 2. Modify the Database Models -5. Finally, confirm that the database looks correct after running the migration and commit the migration file to git. - - > Note that you need to run `black` on the generated migration file. +Edit the `models.py` file to reflect the changes you need. This might include: -### Method 2 +- Adding new tables or columns +- Modifying existing fields +- Deleting tables or columns -If you want to start over, e.g. if something went wrong when going through method 1: +### 3. Create a new migration -1. Restore the content of `migrations/versions`: +To create the migration, pick **one of the following options**. This will create a migration in the folder `migrations/versions`. - a) Remove the new migrations file(s) - b) Run `git restore` on the `migrations/versions` folder +#### Option A -2. Reset the container: `docker-compose down` -3. Remove `flask init-db $$DB_TYPE &&` in the `docker-compose.yml` file. This will prevent the population of the database and instead allow the install of the old schema. -4. Start the container again: `docker-compose up` -5. Follow Method 1 - -## Database issues while running `docker-compose up` +```bash +# 1. Enter the container +docker exec -it dds_backend /bin/sh -If you run into issues with complaints about the db while running `docker-compose up` you can try to reset the containers by running `docker-compose down` before trying again. If you still have issues, try cleaning up containers and volumes manually. +# 2. Generate the migration +flask db migrate -m +``` -> ⚠️ These commands will remove _all_ containers and volumes! -> If you are working on other projects please be more selective. +#### Option B ```bash -docker rm $(docker ps -a -q) -f -docker volume prune +# **Outside** of the container, run the following command +# This will generate the migration +docker exec dds_backend flask db migrate -m ``` -Then run `docker-compose up` as normal. The images will be rebuilt from scratch before launch. +### 4. Review the Generated Migration File -If there are still issues, try deleting the `pycache` folders and repeat the above steps. +Now, a new migration will have been generated in the `migrations/versions` directory. **Review this file carefully** to ensure it correctly represents your intended changes. If not, change the `upgrade` and `downgrade` functions as needed. + +> **NB!** Keep an eye out for changes to the `apscheduler` tables and indexes, and **make sure they are not included in the migration**. +> Apscheduler is no longer used for the cronjobs, but are listed in the requirements still. This note will be removed once we have removed `apscheduler` all together. +For reference on available operations and customization options, check the [Alembic Documentation](https://alembic.sqlalchemy.org/en/latest/ops.html). -THE TEXT BELOW IS WHAT ALVARO WROTE. I WILL BE ADDING PARTS OF IT INTO THE TEXT ABOVE. -### 1. Start the Containers +### 5. Test the migration -Before making any model changes, ensure the containers are running locally. +Once the migration looks ok, test it using one of the following options. Confirm that the database looks correct. -### 2. Modify the Database Models +#### Option A -Edit the `models.py` file to reflect the changes you need. This might include: +```bash +# 1. Enter the container +docker exec -it dds_backend /bin/sh -- Adding new tables or columns -- Modifying existing fields -- Deleting tables or columns +# 2. Run the database upgrade +flask db upgrade +``` -### 3. Access the Backend Container +#### Option B -Connect a terminal into the backend container. +```bash +# **Outside** of the container, run the following command +# This will run the migration and upgrade the database +docker exec dds_backend flask db upgrade +``` -### 4. Run the Migration Command +### 6. Commit the Migration File -Inside the container, execute the migration command: +Finally, commit the migration file to git. -```bash -flask db migrate -m "Your migration message" -``` -### 5. Review the Generated Migration File +## How to start over -A new migration script will be generated in the `migrations/versions` directory. **Review this file carefully** to ensure it correctly represents your intended changes. +If you want to start over, e.g. if something went wrong when following the steps outlined above, follow the steps below. -For reference on available operations and customization options, check the [Alembic Documentation](https://alembic.sqlalchemy.org/en/latest/ops.html). +1. Restore the content of `migrations/versions`: -### 6. Commit the Migration File + a) Remove the new migrations file(s) + b) Run `git restore` on the `migrations/versions` folder + +2. Reset the container: `docker compose down` +3. Remove `flask init-db $$DB_TYPE &&` in the `docker-compose.yml` file. This will prevent the population of the database and instead allow the install of the old schema. +4. Start the container again: `docker-compose up` +5. Follow the [Steps for Generating Migrations](#steps-for-generating-migrations) section + +## Database issues while running `docker-compose up` + +If you run into issues with complaints about the db while running `docker compose up` you can try to reset the containers by running `docker compose down` before trying again. If you still have issues, try cleaning up containers and volumes manually. + +> ⚠️ These commands will remove _all_ containers and volumes! +> If you are working on other projects please be more selective. -Finally, commit the migration script to version control. +```bash +docker rm $(docker ps -a -q) -f +docker volume prune +``` + +Then run `docker compose up` as normal. The images will be rebuilt from scratch before launch. + +If there are still issues, try deleting the `pycache` folders and repeat the above steps. From e4a7feba0f9b7056d3bbcdab3942f983fbb18aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:40:40 +0100 Subject: [PATCH 08/19] ghcr --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab4da964f..8f235be69 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ Equally, if you want to tear down you need to run pytest _twice_ without it, as ## Production Instance -The production version of the backend image is published at the [GitHub Container Registry (GHCR)](ghcr.io/scilifelabdatacentre/dds-backend). It can also be built by running: +The production version of the backend image is published at the [GitHub Container Registry (GHCR, ghcr.io/scilifelabdatacentre/dds-backend)](https://github.com/scilifelabdatacentre/dds_web/pkgs/container/dds-backend). It can also be built by running: ```bash docker build --target production -f Dockerfiles/backend.Dockerfile . From ada80e404e7ca2b3bc3f9858631626908f96b330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:41:28 +0100 Subject: [PATCH 09/19] readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f235be69..a529e46ad 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ All have the password: `password` If you modify the database models (e.g. tables or indexes), you must create a migration for the changes. We use `Alembic` (via `flask-migrate`) which compares our database models with the running database to generate a suggested migration. -For instructions on how to do this, see [the README in the migrations directory](./migrations/README). +For instructions on how to do this, see [the README in the migrations directory](./migrations/README.md). ## Run tests From e03c45474946eaca952031fd464a6e010b67cfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:45:29 +0100 Subject: [PATCH 10/19] prettier --- migrations/README.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/migrations/README.md b/migrations/README.md index cba7f099d..243eacc91 100644 --- a/migrations/README.md +++ b/migrations/README.md @@ -2,7 +2,7 @@ If you modify the database models (e.g. tables or indexes), you must create a migration for the changes. We use `Alembic` (via `flask-migrate`) which compares our database models with the running database to generate a suggested migration. -This document explains how to generate new database migration. +This document explains how to generate new database migration. ## Steps for Generating Migrations @@ -22,7 +22,7 @@ Edit the `models.py` file to reflect the changes you need. This might include: - Modifying existing fields - Deleting tables or columns -### 3. Create a new migration +### 3. Create a new migration To create the migration, pick **one of the following options**. This will create a migration in the folder `migrations/versions`. @@ -46,13 +46,12 @@ docker exec dds_backend flask db migrate -m ### 4. Review the Generated Migration File -Now, a new migration will have been generated in the `migrations/versions` directory. **Review this file carefully** to ensure it correctly represents your intended changes. If not, change the `upgrade` and `downgrade` functions as needed. - -> **NB!** Keep an eye out for changes to the `apscheduler` tables and indexes, and **make sure they are not included in the migration**. -> Apscheduler is no longer used for the cronjobs, but are listed in the requirements still. This note will be removed once we have removed `apscheduler` all together. +Now, a new migration will have been generated in the `migrations/versions` directory. **Review this file carefully** to ensure it correctly represents your intended changes. If not, change the `upgrade` and `downgrade` functions as needed. -For reference on available operations and customization options, check the [Alembic Documentation](https://alembic.sqlalchemy.org/en/latest/ops.html). +> **NB!** Keep an eye out for changes to the `apscheduler` tables and indexes, and **make sure they are not included in the migration**. +> Apscheduler is no longer used for the cronjobs, but are listed in the requirements still. This note will be removed once we have removed `apscheduler` all together. +For reference on available operations and customization options, check the [Alembic Documentation](https://alembic.sqlalchemy.org/en/latest/ops.html). ### 5. Test the migration @@ -66,7 +65,7 @@ docker exec -it dds_backend /bin/sh # 2. Run the database upgrade flask db upgrade -``` +``` #### Option B @@ -78,8 +77,7 @@ docker exec dds_backend flask db upgrade ### 6. Commit the Migration File -Finally, commit the migration file to git. - +Finally, commit the migration file to git. ## How to start over @@ -87,11 +85,11 @@ If you want to start over, e.g. if something went wrong when following the steps 1. Restore the content of `migrations/versions`: - a) Remove the new migrations file(s) - b) Run `git restore` on the `migrations/versions` folder + a) Remove the new migrations file(s) + b) Run `git restore` on the `migrations/versions` folder 2. Reset the container: `docker compose down` -3. Remove `flask init-db $$DB_TYPE &&` in the `docker-compose.yml` file. This will prevent the population of the database and instead allow the install of the old schema. +3. Remove `flask init-db $$DB_TYPE &&` in the `docker-compose.yml` file. This will prevent the population of the database and instead allow the install of the old schema. 4. Start the container again: `docker-compose up` 5. Follow the [Steps for Generating Migrations](#steps-for-generating-migrations) section From 4ddb04117e69b74f22535a81cf6eb8fd9ec3aaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 10:59:50 +0100 Subject: [PATCH 11/19] sprintlog --- SPRINTLOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SPRINTLOG.md b/SPRINTLOG.md index 05c86da58..46554325f 100644 --- a/SPRINTLOG.md +++ b/SPRINTLOG.md @@ -464,3 +464,4 @@ _Nothing merged during this sprint_ - Change the error raised upon attempt to download data after a password reset to an AuthenticationError to avoid getting an alert ([#1571](https://github.com/ScilifelabDataCentre/dds_web/pull/1571)) - Filter out the MaintenanceModeException from the logs ([#1573](https://github.com/ScilifelabDataCentre/dds_web/pull/1573)) - Bugfix: Quick and dirty change to prevent `dds ls --tree` from failing systematically ([#1575](https://github.com/ScilifelabDataCentre/dds_web/pull/1575) +- Instructions regarding database migrations moved to migrations directory, and Linkspector action added to scan for incorrect links in MD ([#1576](https://github.com/ScilifelabDataCentre/dds_web/pull/1576)) From ec32acf9b760e6ca65425d26045aaa3d055dd64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Thu, 5 Dec 2024 11:23:51 +0100 Subject: [PATCH 12/19] linkspector info --- .github/workflows/linkspector.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index f64291e03..c9bc6c803 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -1,3 +1,5 @@ +# Linkspector: Verify links in MD files +--- name: Linkspector on: [pull_request] jobs: From d9d95ceefa28671049b66761baee4913b482337a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Fri, 13 Dec 2024 09:09:54 +0100 Subject: [PATCH 13/19] fix link --- SPRINTLOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SPRINTLOG.md b/SPRINTLOG.md index 1f83de5a5..5fb86b730 100644 --- a/SPRINTLOG.md +++ b/SPRINTLOG.md @@ -239,8 +239,8 @@ _Nothing merged during this sprint_ # 2023-04-14 - 2023-04-28 -- Documentation: Minor update of Technical Overview ((#1411)[https://github.com/ScilifelabDataCentre/dds_web/pull/1411]) -- Documentation: Account roles and their permissions ((#1412)[https://github.com/ScilifelabDataCentre/dds_web/pull/1412]) +- Documentation: Minor update of Technical Overview ([#1411](https://github.com/ScilifelabDataCentre/dds_web/pull/1411)) +- Documentation: Account roles and their permissions ([#1412](https://github.com/ScilifelabDataCentre/dds_web/pull/1412)) # 2023-05-26 - 2023-06-09 From 7d36dc322e79f801037b7ec89d131eb13aa469c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Mon, 16 Dec 2024 10:26:33 +0100 Subject: [PATCH 14/19] permissions --- .github/workflows/linkspector.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index c9bc6c803..b1afe26af 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -2,6 +2,8 @@ --- name: Linkspector on: [pull_request] +permissions: + pull-requests: write jobs: check-links: name: runner / linkspector From c2bac97e17011a2b507083fd59bd25d7e34952c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Mon, 16 Dec 2024 10:28:11 +0100 Subject: [PATCH 15/19] prettier --- .github/workflows/linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index b1afe26af..473344f4a 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -2,7 +2,7 @@ --- name: Linkspector on: [pull_request] -permissions: +permissions: pull-requests: write jobs: check-links: From 0e4aa45876eb5d5690033836adeda1742537a3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Mon, 16 Dec 2024 10:45:24 +0100 Subject: [PATCH 16/19] change reporter type --- .github/workflows/linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index 473344f4a..49a7b73bc 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -14,5 +14,5 @@ jobs: uses: umbrelladocs/action-linkspector@v1 with: github_token: ${{ secrets.github_token }} - reporter: github-pr-review + reporter: github-pr-check filter_mode: file From a0322b29d1d4c2f9f3832c047fd87954cc9c7b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Tue, 17 Dec 2024 10:27:10 +0100 Subject: [PATCH 17/19] change in ubuntu version --- .github/workflows/linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index 49a7b73bc..3cc75b647 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -7,7 +7,7 @@ permissions: jobs: check-links: name: runner / linkspector - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Run linkspector From 9694b9f607c78e494704130bf3b2b457277a0752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Tue, 17 Dec 2024 10:29:44 +0100 Subject: [PATCH 18/19] change reporter type again --- .github/workflows/linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index 3cc75b647..1523313eb 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -14,5 +14,5 @@ jobs: uses: umbrelladocs/action-linkspector@v1 with: github_token: ${{ secrets.github_token }} - reporter: github-pr-check + reporter: github-pr-review filter_mode: file From 457a3bf8cc3db7d4edd9be5dcaeb0ea83be9417e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ina=20Od=C3=A9n=20=C3=96sterbo?= Date: Tue, 17 Dec 2024 10:34:39 +0100 Subject: [PATCH 19/19] 22.04 --- .github/workflows/linkspector.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkspector.yml b/.github/workflows/linkspector.yml index 1523313eb..ad3412d6c 100644 --- a/.github/workflows/linkspector.yml +++ b/.github/workflows/linkspector.yml @@ -7,7 +7,7 @@ permissions: jobs: check-links: name: runner / linkspector - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Run linkspector