Implements pagination and unread-only filter options to notifications/all endpoint#11854
Merged
sekmiller merged 201 commits into11804-notifs-api-extfrom Nov 24, 2025
Merged
Conversation
Revert #11301 and bump version to 6.7.1
when cutting a release, base.image.version needs to be "revision" #11700
…11639 Implemented a method to parse strings into `SettingsServiceBean.Key` values, handling null and invalid inputs gracefully. Added corresponding unit tests to verify behavior and maintain consistency.
…hout language data #11639 Replaced usage of `listAll` with the new `listAllWithoutLocalizations` method in various parts of the codebase for improved clarity and targeted queries. Added the corresponding named query `Setting.findAllWithoutLang`. Before, listAll was used in context without localization present or dropping the l10n details from outputs. For example, the Admin API to get all settings neglected to share the localized information, making one setting appear multiple times without the l10n information present. This is still subject to change, enabling the API endpoints to keep this information around.
…ion support #11639 Replaced `listAllWithoutLocalizations` in the Admin API with the new `listAllAsJson` method, enabling inclusion of localized setting variants in API responses. Added OpenAPI annotations for improved documentation. Introduced comprehensive unit tests to validate behavior of localized and non-localized settings handling.
This is because Intellij IDEA's MavenJUnitPatcher only correctly uses the maven-surefire-plugin <argLine> if all interpolated properties are present. If a single property is missing, the <argLine> will not be used by IntelliJ's test runner, which is horrible to debug. See also https://github.com/kreiger/idea-maven-test-profiles-argline
Introduced new methods in `SystemConfig` to support tabular ingest size limits as JSON objects or single values. This replaces the old way of using colon-separated format suffixes with the setting name. Enhanced flexibility with format-specific or universal defaults. Updated `EditDatafilesPage` to populate human-readable format-specific limits. Added comprehensive unit tests to validate behavior, including edge cases for invalid configurations.
… Flyway #11639 Implemented migration script to replace old format-specific TabularIngestSizeLimit settings with a unified JSON-based structure. Validates and handles non-numeric values, ensures backward compatibility, and cleans up obsolete settings.
… and defaults #11639 Refined the explanation of tabular ingest size limits, introduced examples for JSON configuration, clarified default behavior, and updated guidance on per-format overrides.
…11639 Updated warnings and validation logic to enforce string literals for size limits. Added a new test to ensure proper handling of JSON configurations with unsupported integer types for tabular ingest size limits. Improved related documentation for clarity.
#11639 Streamlined the logic of `listAllAsJson` to use a flattened structure for localized settings, improving maintainability and backward compatibility. Updated test assertions in `SettingsServiceBeanTest` to reflect the new structure. Added enhanced method documentation.
…ettings API #11639 Introduced validation logic for setting names and ISO 639-1 language codes across Admin API endpoints. Ensures meaningful error messages for invalid inputs, improving robustness and user feedback. Refactored related methods accordingly. Added missing GET endpoint for localized settings.
…ate tests #11639 Enhanced `listAllAsJson` to handle settings with JSON content as proper JSON objects in the API response. Introduced a constant for localization key separator. Updated unit tests to cover new behavior with JSON settings.
… codes in `SettingsServiceBean` #11639 Moved `validateSettingName` and `validateSettingLang` from `Admin` to `SettingsServiceBean` to improve reusability and maintain consistency. Updated tests and API endpoints to use the centralized methods. Expanded test coverage for validation scenarios.
…tests #11639 Introduced `validateKeys` method in `SettingsServiceBean` to ensure proper settings key validation, including localized and non-localized cases. Added parameterized test coverage for validation scenarios in `SettingsServiceBeanTest`.
…it tests #11639 Introduced `convertJsonToSettings` in `SettingsServiceBean` to transform JSON objects into `Setting` instances, supporting language-specific keys. Added comprehensive unit tests to verify functionality with various JSON structures.
…date #11639 Introduced a new `PUT /api/admin/settings` endpoint to update all settings in bulk with JSON input. Added `setAllFromJson` method and placeholder implementation for `replaceAllSettings` in `SettingsServiceBean`. Validates input structure and ensures atomic updates.
…s default for `lang` #11639 Replaced `NULL` with empty string for `lang` field in `Setting` entity to align with SQL standards and ensure unique constraint behavior. Updated queries, methods, and added safeguards to handle empty `lang` consistently. Enhanced documentation for clarity.
… for `name` in `Setting` entity #11639 Updated `name` field to enforce a maximum length of 200 characters on a VARCHAR field for better performance (replacing the TEXT column type) and mark it as non-nullable (null settings make no sense at all). Added `Objects.requireNonNull` validation for `name` in entity methods and constructors to ensure consistent behavior.
Introduced SQL migration to optimize `Setting` table by switching `TEXT` columns to `VARCHAR` for better performance, enforcing `NOT NULL` constraints, adding a unique constraint for `name` and `lang`, and setting default empty string for `lang`. Includes logic to handle existing data and conditional checks for schema changes.
…ty and robustness #11639 Refined `equals` and `hashCode` methods to base equality comparison on `name` and `lang` fields, improving consistency and alignment with usage patterns. Updated the no-argument constructor to protected, adding explanatory comments for enforced design intent and JPA compatibility.
… alignment and consistency #11639 Updated references, documentation, and added migration script to reflect the renaming and ensure adherence to naming conventions. Marked the setting as deprecated for removal.
…for reusability #11639 Moved logic for constructing JSON keys into a dedicated method `convertToJsonKey`, improving code clarity and reducing duplication.
…ter migrations #11654 Introduced a Flyway callback to clean up entries in the `setting` table with unknown keys post-migration. Updated `StartupFlywayMigrator` to register this callback.
Bumps [appleboy/ssh-action](https://github.com/appleboy/ssh-action) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/appleboy/ssh-action/releases) - [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml) - [Commits](appleboy/ssh-action@v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: appleboy/ssh-action dependency-version: 1.2.3 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> Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
…ling QDR-DataCite Scaling
doc update sphinx 7.2.6 -> 7.4.0
Database Settings: idempotent mass operations, necessary cleanup and script using it for real use case
Metadata language api call
…icted-draft show draft/unpublished in UI
refactor UpdateDatasetLicenseCommand to extend AbstractDatasetCommand<Dataset>
* 11744: CORS: echo request Origin and add Vary: Origin; sanitize CSV lists; prefer comma-separated origins; rely on JVM options/MicroProfile only; add tests and release notes * Centralize CSV parsing (CsvUtil) + CORS origin echo & Vary header improvements * Make CORS origin list optional in CorsFilter initialization * Refactor GlobusOverlayAccessIO and CsvUtil for improved endpoint handling and CSV parsing * updated release note and comments * test fixes * Clarify CORS requirements for browser-based external tools in documentation * Update CORS documentation to clarify configuration requirements and deprecate legacy settings * Remove unused CSV lookup methods * Update JvmSettings documentation to clarify CSV list return types * Refactor doc structure for improved readability and maintainability * wording * Removed deprecated (and removed from code) AllowCors setting from doc * Fix formatting inconsistencies in dataset management documentation * rename: CsvUtil -> ListSplitUtil * Refactor CSV list lookup methods to join array elements before splitting * Rename CSV list lookup methods to use 'lookupSplittedList' for consistency * revert whitespace changes done by automated formatting tool * revert whitespace-only changes done by automatic tool * code cleanup * code cleanup * revert whitespace changes done by automated formatting tool * revert whitespace changes done by automated formatting tool * revert whitespace changes done by automated formatting tool * revert whitespace changes done by automated formatting tool * remove legacy dependency on SettingsServiceBean in CorsFilterTest * refactor: replace Arrays.stream with ListSplitUtil.split in CorsFilter * refactor: replace ListSplitUtil.split with Arrays.stream for list processing in JvmSettings * Enhance JvmSettings: Add trimming options for lookupSplittedList methods to handle whitespace in tokenized values --------- Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
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.
What this PR does / why we need it:
Review #11851 first.
The user notifications endpoint has been enhanced with new optional query parameters to allow for more specific and
efficient data retrieval.
1. Filter by Unread Status
You can now fetch only unread notifications by using the
onlyUnreadboolean parameter.onlyUnread: (Optional, boolean) When set totrue, the API will only return notifications that the user has notyet marked as read.
Example:
2. Pagination Support
Pagination is now supported through the limit and offset parameters, allowing you to retrieve notifications in smaller,
manageable chunks.
limit: (Optional, integer) Specifies the maximum number of notifications to return.offset: (Optional, integer) Specifies the number of notifications to skip before starting to return results.Example (Retrieve notifications 11 through 20):
Which issue(s) this PR closes:
Suggestions on how to test this:
Described above
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
None
Is there a release notes update needed for this change?:
Yes, attached