Skip to content
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 #13

Merged
merged 31 commits into from
May 17, 2024
Merged

Production update #13

merged 31 commits into from
May 17, 2024

Conversation

juuso-j
Copy link
Collaborator

@juuso-j juuso-j commented May 17, 2024

Changes

#9 Helsinki v3.1 changes

Minor changes

#12 Fix/api documentation errors
#11 Add Turku specific host/url to documentation

samimedallal and others added 30 commits November 15, 2023 09:18
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.
…dd-turku-specific-hosts-and-urls

Add Turku specific host/url to documentation
@juuso-j juuso-j added documentation Improvements or additions to documentation enhancement New feature or request labels May 17, 2024
@juuso-j juuso-j requested a review from ezkat May 17, 2024 08:53
@juuso-j juuso-j self-assigned this May 17, 2024
@juuso-j juuso-j merged commit ed5eebd into master May 17, 2024
10 checks passed
juuso-j added a commit that referenced this pull request May 20, 2024
This reverts commit ed5eebd, reversing
changes made to 0dd21d1.
SanttuA added a commit to SanttuA/parkkihubi that referenced this pull request May 20, 2024
juuso-j added a commit to juuso-j/parkkihubi_test that referenced this pull request May 20, 2024
juuso-j added a commit that referenced this pull request May 21, 2024
juuso-j added a commit that referenced this pull request May 21, 2024
…0ab59006b1d1750ba8bb31c5b42

Revert "Merge pull request #13 from City-of-Turku/develop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants