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

feat: Enable UpgradePlugins to restrict to a specific graph and update the knora base version to 26 #3005

Merged
merged 14 commits into from Jan 31, 2024

Conversation

seakayone
Copy link
Collaborator

@seakayone seakayone commented Jan 25, 2024

Pull Request Checklist

Task Description/Number

This PR allows an UpgradePlugin to confine its changes to a specific set of graphs. This speed up the upgrade process substantially. If UpgradePlugins only need to update the builtIn ontology graphs there is no need to drop all other ontology or data graphs.

Moves knora-ontologies to webapi/src/main/resources/knora-ontologies in order to make the ontologies part of the classpath. This is necessary for local development in order to run the UpgradePlugins locally. Hence, we can remove adding them to the container manually. Retains a symbolic link on the root level of this repo so that other scripts and test code still can find them. Cleaning this up is left for a followup issue in order to keep the size of this PR manageable.

Replaces NoopPlugin with a more adequately named MigrateOnlyBuiltInGraphs. This plugin is updating the builtIn graphs (i.e. the ones found in knora-ontologies) once applied.

Upgrades the knora base version to 26 and applies above migration plugin in order to update the builtIn graphs to the latest version.

PR Type

  • build/chore: maintenance tasks (no production code change)
  • docs: documentation changes (no production code change)
  • feat: represents new features
  • fix: represents bug fixes
  • perf: performance improvements
  • refactor: represents production code refactoring
  • test: adding or refactoring tests (no production code change)

Basic requirements for bug fixes and features

  • Tests for the changes have been added
  • Docs have been added / updated

Does this PR introduce a breaking change?

  • Yes

Does this PR change client-test-data?

  • Yes

@seakayone seakayone changed the base branch from main to feat/add-default-watermark-to-sipi January 25, 2024 11:16
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eac5751) 11.74% compared to head (bb957d2) 88.50%.
Report is 35 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3005       +/-   ##
===========================================
+ Coverage   11.74%   88.50%   +76.76%     
===========================================
  Files         246      263       +17     
  Lines       22907    23099      +192     
===========================================
+ Hits         2690    20444    +17754     
+ Misses      20217     2655    -17562     

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

Base automatically changed from feat/add-default-watermark-to-sipi to main January 25, 2024 13:51
@seakayone seakayone self-assigned this Jan 25, 2024
@seakayone seakayone requested review from mpro7, BalduinLandolt and subotic and removed request for mpro7 and BalduinLandolt January 25, 2024 14:43
@seakayone seakayone force-pushed the feat/enable-plugins-to-restrict-to-a-specific-graph branch from 02e71d6 to 4b4576c Compare January 25, 2024 14:44
@seakayone seakayone marked this pull request as ready for review January 25, 2024 14:51
Copy link
Collaborator

@mpro7 mpro7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this update, it looks promising! Although I approve it please wait in this case for all reviewers feedback.

@seakayone
Copy link
Collaborator Author

Thanks for this update, it looks promising! Although I approve it please wait in this case for all reviewers feedback.

I appreciate your review, have you been able to test this out locally?

@mpro7
Copy link
Collaborator

mpro7 commented Jan 29, 2024

Thanks for this update, it looks promising! Although I approve it please wait in this case for all reviewers feedback.

I appreciate your review, have you been able to test this out locally?

Yes, repository upgrade test passed locally.

@seakayone seakayone changed the title feat: Enable plugins to restrict to a specific graph and update the knora base version to 26 feat: Enable UpgradePlugins to restrict to a specific graph and update the knora base version to 26 Jan 31, 2024
@BalduinLandolt
Copy link
Collaborator

Moves knora-ontologies to webapi/src/main/resources/knora-ontologies ...

@jnussbaum FYI - my guess is that symlinks will not work over github, so it's probably best to change it in TOOLS right away when this is merged. (And RDU will then have to update their DSP-TOOLS version, I suppose.)

Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I like the changes and I'm looking forward to continue improving the plugin situation, but this takes away the immediate pressure, which is great!

@jnussbaum
Copy link
Contributor

Moves knora-ontologies to webapi/src/main/resources/knora-ontologies ...

@jnussbaum FYI - my guess is that symlinks will not work over github, so it's probably best to change it in TOOLS right away when this is merged. (And RDU will then have to update their DSP-TOOLS version, I suppose.)

@BalduinLandolt So if I get you right, we have to modify our URLs as follows:

webapi/scripts/fuseki-repository-config.ttl.template   stays as is
knora-ontologies/xyz.ttl                               webapi/src/main/resources/knora-ontologies/xyz.ttl
test_data/project_data/xyz.ttl                         stays as is
test_data/project_ontologies/xyz.ttl                   stays as is

@BalduinLandolt
Copy link
Collaborator

Moves knora-ontologies to webapi/src/main/resources/knora-ontologies ...

@jnussbaum FYI - my guess is that symlinks will not work over github, so it's probably best to change it in TOOLS right away when this is merged. (And RDU will then have to update their DSP-TOOLS version, I suppose.)

@BalduinLandolt So if I get you right, we have to modify our URLs as follows:

webapi/scripts/fuseki-repository-config.ttl.template   stays as is
knora-ontologies/xyz.ttl                               webapi/src/main/resources/knora-ontologies/xyz.ttl
test_data/project_data/xyz.ttl                         stays as is
test_data/project_ontologies/xyz.ttl                   stays as is

Looks right, but I would suggest quickly testing it to verify, once this is merged, just to be sure.

@seakayone seakayone merged commit e54aa0b into main Jan 31, 2024
13 checks passed
@seakayone seakayone deleted the feat/enable-plugins-to-restrict-to-a-specific-graph branch January 31, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants