-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix(auto-rules): PeriodicArchiver scans archives on startup #551
fix(auto-rules): PeriodicArchiver scans archives on startup #551
Conversation
I requested a review so I know if I'm on the right track before I start updating the corresponding unit tests. |
@andrewazores After adding Janelle's fork as a remote repo (in order to get her branch), I'm assuming I'd have to wait until she's pushed the required changes before rebasing on top of her branch? |
You'd have to rebase after each change she makes to her branch anyway, up until eventually her branch is merged into main, at which point you would rebase onto main as well. If her branch doesn't yet contain the changes you need then you can still rebase on top of it for now, and then re-rebase later after her branch is updated with the changes. |
🎉 Great news! Looks like all the dependencies have been resolved: 💡 To add or remove a dependency please update this issue/PR description. Brought to you by Dependent Issues (:robot: ). Happy coding! |
Before I make more changes, I'm going to rebase on to upstream/main now that Janelle's PR has been merged. During this interactive rebase, I noticed my commit history contains Janelle's commits first (up to a certain point before the branch got merged and deleted) and then my commits (due to the rebasing I did). Since upstream/main already contains all of Janelle's commits, should I drop her commits from my branch, keeping only my commits, thereby minimizing merge conflicts during the rebase? |
Yes exactly, you should drop all of the commits in your branch that are from the old base. Those changes (roughly) are now in |
Nice, that makes sense. This was a good way for me to get more comfortable with Git. |
Could you take a look at just the Edit: Also, for the various archived recording handlers (GET, DELETE, etc.) I'm thinking of changing them so that the target service URI is now a request parameter, allowing me to properly index searches in the restructured directory. Does that seem right? |
You mean to add the target's service URI as a path parameter on the request? That would be a breaking API change, so it shouldn't be done to the existing V1 handlers. If I'm understanding correctly, the concern is that ex. This is no different from the current state of the archives really, though - right now we might have I do think that along with subdividing the archives by target it would make sense to mirror that change in the API, but it would need to be done in V2 handlers. If we had that then the unstructured archives used by the V1 handlers could be loosened up further and not require uploads to follow any filename convention, and this could be used to allow users to upload arbitrary JFR files for analysis using jfr-datasource/grafana. They can already do this, really, but the filename convention is a minor barrier that makes that a bit annoying. Anyway, getting on a tangent. For the scope of this issue/PR, I don't think we want any V1 API behaviour to be changed - everything done in here should be an internal implementation detail. If it sets us up for V2 (or V3) enhancements later like what I outlined above, then great. |
src/main/java/io/cryostat/recordings/RecordingArchiveHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/recordings/RecordingArchiveHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/recordings/RecordingArchiveHelper.java
Outdated
Show resolved
Hide resolved
Alright, thanks for the thorough explanation, makes sense. |
src/main/java/io/cryostat/net/web/http/api/v1/RecordingDeleteHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v1/RecordingDeleteHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v1/RecordingGetHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v1/RecordingUploadPostHandler.java
Outdated
Show resolved
Hide resolved
… path getter function
…cording path getter function
…elper; replace old, static RecordingNotFoundException class with new, separate class
Looks good to go, the only new changes are the two commits above, the first of which is due to messing up the rebase when bringing in your changes from #599. Edit: On that note, during an interactive rebase is it fine if I make any changes I see fit when resolving conflicts or should I stick to only pressing the "Accept current changes", "Accept incoming changes", "Accept both changes", etc. commands? I'm worried I might mess something up regarding the commit history if I move stuff around or add/delete too much. |
It's best to just resolve the conflicts during the rebase so that each commit in the series can re-apply. If there are any further adjustments required - in this example, updating tests because a method was added to an interface in the branch you're rebasing onto - it's usually easiest/cleanest to do as you did and add that as an additional commit on top. The more you do to adjust the commits in series during conflict resolution, the more likely those changes are to cause further conflicts with the next commits in the series. |
…6.1 to 4.8.6.2 (cryostatio#551) build(deps): bump com.github.spotbugs:spotbugs-maven-plugin Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.8.6.1 to 4.8.6.2. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.8.6.1...spotbugs-maven-plugin-4.8.6.2) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
By scanning existing archives on startup, this fix allows pruning of old recordings from previous calls to
PeriodicArchiver
for a given rule.Fixes #542
Depends on #557