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

Allow loading selected projects using environment variable #774

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

juhoinkinen
Copy link
Member

@juhoinkinen juhoinkinen commented Feb 29, 2024

This PR makes it possible to select the projects that Annif loads on startup via a regexp pattern given in the environment variable ANNIF_PROJECTS_INIT. The same env can be used in NGINX in its location directive configuration to make NGINX pass a request to the Annif instance that has loaded the requested project.

An image with these changes has been running at ai.dev.finto.fi. The used helm-chart includes grouping projects with these environment variables:

yso-.*fi
yso-.*sv
yso-.*en
kauno-.*
thema-.*
ykl-.*

Closes #733.

Copy link

sonarcloud bot commented Feb 29, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.65%. Comparing base (eba2b0c) to head (54ee767).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #774   +/-   ##
=======================================
  Coverage   99.65%   99.65%           
=======================================
  Files          89       89           
  Lines        6404     6422   +18     
=======================================
+ Hits         6382     6400   +18     
  Misses         22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juhoinkinen juhoinkinen marked this pull request as ready for review April 16, 2024 10:33
@juhoinkinen juhoinkinen merged commit 2e5e987 into main Apr 16, 2024
16 of 19 checks passed
@juhoinkinen juhoinkinen deleted the issue733-allow-loading-selected-projects branch April 16, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow loading only selected projects for better compatibility in container environments
1 participant