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: Compaction endpoint, guarded (DEV-3703) #3265

Merged
merged 6 commits into from
Jun 6, 2024

Conversation

siers
Copy link
Contributor

@siers siers commented Jun 4, 2024

Pull Request Checklist

  1. @BalduinLandolt are the warn/debug info/warn changes required?
  2. Is if (knoraBaseOntologyVersion != KnoraBaseVersion) commented out for any particular purpose? Should I revert it?

The flag is disabled by default and I assume should be enabled for test envs in ops-deploy. It was tested both with false and true and was double checked to be false by default.

Task Description/Number

Issue Number: DEV-3703

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)
  • deprecated: Deprecation warning (ideally referencing a migration guide)

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

Copy link

linear bot commented Jun 4, 2024

@siers siers self-assigned this Jun 4, 2024
@BalduinLandolt
Copy link
Contributor

  1. @BalduinLandolt are the warn/debug info/warn changes required?

no, that was only to make things easiert in the context of the old PR

  1. Is if (knoraBaseOntologyVersion != KnoraBaseVersion) commented out for any particular purpose? Should I revert it?

yes, that was only relevant in the context of the old PR

Same goes for the changed time-out, that can be reverted too

@siers siers marked this pull request as ready for review June 4, 2024 12:37
@siers siers force-pushed the feat/DEB-3703-db-compaction branch from 11a5b5f to 6531413 Compare June 4, 2024 12:37
Copy link
Contributor

@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.

LGTM

Copy link
Contributor

@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.

sorry for the double review... please check my comment

@@ -85,6 +86,11 @@ final case class ManagementEndpoints(baseEndpoints: BaseEndpoints) {
.out(jsonBody[HealthResponse])
.out(statusCode)

private[infrastructure] val postStartCompaction = baseEndpoints.publicEndpoint.post
Copy link
Contributor

Choose a reason for hiding this comment

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

question (blocking): I overlooked this at first... but if you use publicEndpoint does that mean that this can be triggered without authentication?
This should only be possible for system admins, I suppose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ClassTooLarge problem encountered.

I have solved by removing the top layer all the dependencies from the dep. graph that, the ones that were "top" dependencies (all the actor stuff is final, for example) are now extracted. This method should be reappliable, but though it's not quite trivial.

Anyhow, the PR is tested, hoping for a green build now.

@siers siers force-pushed the feat/DEB-3703-db-compaction branch from 6531413 to 96999d6 Compare June 6, 2024 14:17
Copy link
Contributor

@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.

Build not quite green... but from the code point of view, I'd say it's good to merge once it builds and the tests pass.

@siers
Copy link
Contributor Author

siers commented Jun 6, 2024

Hah, what the hell! I'll check in a bit!

@siers siers force-pushed the feat/DEB-3703-db-compaction branch from d71c8a4 to 11b5693 Compare June 6, 2024 15:05
@siers siers enabled auto-merge (squash) June 6, 2024 15:07
@siers siers merged commit d5576b5 into main Jun 6, 2024
9 checks passed
@siers siers deleted the feat/DEB-3703-db-compaction branch June 6, 2024 16:00
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.

2 participants