forked from City-of-Helsinki/parkkihubi
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Production update #10
Closed
+1,127
−1,559
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Production was upgraded to PostgreSQL 15.4 so docker postgis needs to be upgraded as well to the closest version.
Specify platform as "linux/amd64" for the app container in the docker-compose.yml, because that's what it's supposed to be and it won't even work on e.g. ARM based archs. (Some deps won't compile.) Change the appuser uid to 1000, since that is very often the same uid as the developer's uid on a Linux host, which could avoid some problems when the source tree is mounted as a volume to the container and still being modified from the host.
Specify platform as "linux/amd64" for the app container in the docker-compose.yml, because that's what it's supposed to be and it won't even work on e.g. ARM based archs. (Some deps won't compile.) Change the appuser uid to 1000, since that is very often the same uid as the developer's uid on a Linux host, which could avoid some problems when the source tree is mounted as a volume to the container and still being modified from the host.
Add a QuerySet method named "for_user" for PermitAreas and use it instead of direct filtering by the field name. This allows changing the field name without changes to these filters. Refs HPH-36
Add a new many-2-many field named "allowed_users" to PermitArea and populate it with the user object from the "permitted_user" field. This allows multiple operators/enforcers to use the same PermitAreas for their permits. also make the permitted_user field nullable for now to allow migrations to be reversed. Refs HPH-36
Remove the "permitted_user" field from the PermitArea model and update all code to use the "allowed_users" instead, because the field is now redundant. Refs HPH-36
Rename all occurences of "permitted_user" to "allowed_user" so that code matches the new naming of the field. The tests are still utilizing just a single allowed user per area, but that should be fine for now. Refs HPH-36
Make the "allowed_user" parameter optional, since now it's possible to create the PermitAreas without any allowed users and it could make sense to import new areas without assigning them to any users at import time. Refs HPH-36
Add a few test cases that make sure that the creation of permits via the Operator API works correctly even when the PermitArea has more than one allowed user. Refs HPH-36
Add support for allowing sharing of the PermitAreas between operators and the enforcer. Previously it was possible to use each PermitArea for just a single enforcer or operator. This was especially problematic, because the PermitArea codes were unique within enforcement domains so it was not even possible to create duplicate areas with the same identifiers.
Fix the function name to run when executing the migration (in forward direction). Refs HPH-36
…f-Helsinki#277) Fix the function name to run when executing the migration (in forward direction).
The GitHub actions started to fail, because this step was unable to find the deb packages when installing the gdal-bin. It seems that the problem was related to package lists not being up-to-date and adding "apt-get update" before the installation helps.
The GitHub actions started to fail, because this step was unable to find the deb packages when installing the gdal-bin. It seems that the problem was related to package lists not being up-to-date and adding "apt-get update" before the installation helps.
Add a document that describes the Method Override feature, which will be implemented if the spec is approved. A PDF version of the spec can be converted from the MD with pandoc.
Implement the method override feature as was documented in the previous commit: Make it possible to override the HTTP method of the API calls via a query parameter named "method". This allows using the API with some limited clients which don't support all HTTP methods. To enable this feature the real HTTP method has to be POST and (for now) only supported methods are DELETE, PATCH and PUT.
The redoc-cli tool is deprecated and @redocly/cli is suggested as the replacement so switch our generate-docs script to use the "openapi" from @redocly/cli. Also update all of the npm dependencies to their latest versions.
Document and implement a new feature named Method Override. Check details of the feature from the provided Markdown documentation file.
Parkkihubi 3.1
Helsinki v3.1 changes
juuso-j
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
labels
May 16, 2024
ezkat
approved these changes
May 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
#9 Helsinki v3.1 changes