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

[DO NOT MERGE] Epic/performance #7851

Closed
wants to merge 138 commits into from
Closed

Conversation

caleeli
Copy link
Contributor

@caleeli caleeli commented Dec 23, 2024

Created for testing purposes.

ci:deploy
ci:package-translations:epic/FOUR-20326
ci:package-decision-engine:feature/FOUR-18060
ci:package-savedsearch:epic/FOUR-20331
ci:package-webentry:epic/FOUR-20929
ci:modeler:epic/FOUR-20295

Rodrigo Quelca and others added 30 commits November 25, 2024 16:56
FOUR-20912:  Enhance Test Coverage for Screens Functionality Before Adding Cache
- Introduced IfNoneMatch middleware to handle ETag-based caching:
  - Supports safe HTTP methods (GET, HEAD).
  - Returns "304 Not Modified" for matching ETags.
  - Handles multiple ETags and restores original request methods.

- Added EtagManager for flexible ETag generation:
  - Default ETag generation uses MD5 hash.
  - Supports custom hash algorithms like SHA-256 via callbacks.

- Included test cases:
  - Validate default ETag generation.
  - Test custom callback logic for ETag creation.

This commit adds foundational support for ETag-based caching in the application.
FOUR-20504 enhance test coverage for settings functionality before adding cache
…ware

- Merged `etag.set` and `etag.if-none-match` middlewares into a single `etag.handle` middleware.
- Simplified logic to reduce redundancy and improve maintainability.
- Ensured ETag validation (`If-None-Match`) and generation are handled in the same flow.
- Preserved compatibility with HEAD requests for consistency.

This refactor improves clarity, reduces potential misconfigurations, and keeps the ETag logic centralized.
…d tests

- Created tests for the new `HandleEtag` middleware:
  - Validates ETag generation and correctness.
  - Tests responses for both matching and non-matching `If-None-Match` headers.
  - Ensures proper handling of weak ETags (`W/`).
- Removed old tests for `SetEtag` and `IfNoneMatch` middlewares as they are no longer needed.

This commit improves test clarity and ensures the new ETag middleware behaves as expected.
- Added a test to validate ETag generation for user-specific routes using `etag:user`.
  - Simulates an authenticated user and verifies the ETag includes the user ID.

These tests ensure the ETag middleware behaves correctly for both user-specific and common routes.
FOUR-20467 implement a caching system for settings
FOUR-20933: Implement ETag Caching for Screens Data
devmiguelangel and others added 26 commits December 18, 2024 00:34
FOUR-20954: Monitor ETag Caching Performance
FOUR-21301 Fix the tests MetricsServiceTest.php and MetricsFacadeTest…
FOUR-21263 implement a general method to index cache keys
FOUR-20917: Ensure Scalable Caching Solution
Copy link

gitguardian bot commented Dec 23, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
14796648 Triggered Generic Password 5a10ad0 metrics/compose.yaml View secret
14796648 Triggered Generic Password 6760384 metrics/compose.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@caleeli
Copy link
Contributor Author

caleeli commented Jan 10, 2025

closed

@caleeli caleeli closed this Jan 10, 2025
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.

6 participants