Repository navigation
fix(maven): let a repository with an empty entry take a type - #45
Merged
Merged
Conversation
A typed GROUP or PROXY that still lists an empty proxied entry was rejected on save, although the server already ignores blank entries of untyped repositories. A blank entry names no repository, so typed repositories now drop blank proxied references before the rules are checked and store the cleaned list. Untyped repositories are not rewritten, and every other typed rule is unchanged.
A settings update that broke a rule was answered with the toString of the internal exception, so the dashboard showed a Java class name in front of the rule. The rejection now carries the rules as a list, and the 400 response uses the message of that failure: the rules as written, without a class name or a prefix. The check runs for every settings domain, because they all share the same update path.
Switching a repository to a typed group or proxy kept its empty mirrored
entries, and the save then failed on them. The switch now drops the
blank entries from the form and names them in its confirmation ("1
empty entry will be removed."), with the same confirm flow as the other
removals. Blank entries no longer count as violations of the type,
because the server drops them. The error banner shows the message of a
failure without the Java exception class name in front of it.
Test results 260 files 260 suites 56m 11s ⏱️ Results for commit ff5c082. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A typed GROUP or PROXY that still listed an empty mirrored entry could not be saved. The dashboard showed
Not saved: Maven. java.lang.IllegalArgumentException: Invalid maven settings: repository 'onelitefeather': type GROUP has an empty proxied reference. A blank entry names no repository, and the server already ignores it for untyped repositories, so it should not block a type.What changes:
Three commits, one type each:
fix(maven),fix(settings),fix(ui).Type of change
fix- bug fixfeat- new featurerefactor- internal change without behaviour changeperf- performance improvementdocs- documentation onlytest- tests onlybuild/ci/chore- tooling, dependencies, pipelinesHow was this tested?
./gradlew :reposilite-backend:test --tests 'com.reposilite.maven.application.RepositoryTypeSettingsTest' --tests 'com.reposilite.configuration.shared.DefaultSharedSettingsReferenceTest': all pass (30 and 3 tests)../gradlew :reposilite-backend:integration --tests 'com.reposilite.maven.RepositoryTypesIntegrationTest' --tests 'com.reposilite.configuration.LocalSettingsIntegrationTest' --tests 'com.reposilite.configuration.RemoteSettingsIntegrationTest': all pass (11, 15 and 15 tests). They cover a PUT of a typed GROUP with empty and blank entries that saves and stores the cleaned list, a rejected maven update answered with the exact rule and nojava.lang, and a rejected login domain answered with 400 and the rule.npx vitest runon the touched files (repositoryTypes.test.js,EntryDetail.type.test.js,toast.test.js), plusconfiguration-conflicts.test.jsanduseLoginSettings.test.jsbecause they assert on the error text: all pass. ESLint is clean on the touched frontend files../gradlew buildand the full test suites.Checklist
CLAUDE.md(English, imperative, one offeat,fix,docs,refactor,test,build,ci,chore,perf)./gradlew buildpasses locally (only the touched test classes were run, see above)