test: retry layer api - integration tests#48
Merged
razbroc merged 27 commits intofeat/retry-api-v2from Dec 11, 2025
Merged
Conversation
Contributor
razbroc
commented
Dec 1, 2025
| Question | Answer |
|---|---|
| Tests added | ✔ |
…date bad request test cases for ingestion
…pdate test case descriptions for clarity
CL-SHLOMIKONCHA
requested changes
Dec 3, 2025
Contributor
CL-SHLOMIKONCHA
left a comment
There was a problem hiding this comment.
all notes are discussed - will review after changes
…trigger into tests/retryLayer-api-integration
…estion process + fix tests
…arity and structure
…and add checksum unit test
* chore: update to new raster-shared * refactor: remove unused validationTaskParametersSchema and update validation logic to use ingestionValidationTaskParamsSchema * refactor: remove unused checksumSchema import from interfaces
Contributor
CL-SHLOMIKONCHA
left a comment
There was a problem hiding this comment.
ChecksumValidationParameters we can extract this type from existing validation task parameters schema within raster-shared
…data generation - Updated bad request test cases in ingestion.spec.ts to ensure comprehensive coverage of input validation scenarios. - Adjusted the count of regions in metadata generation to a maximum of 5 instead of 100 for better test performance. - Modified input files generation to limit gpkgFilesPath to a single file for more controlled testing. - Ensured consistency in file path generation across various mock functions.
CL-SHLOMIKONCHA
requested changes
Dec 10, 2025
|
|
||
| (createReadStream as jest.Mock).mockReturnValue(mockStream); | ||
| // Convert hex string to bigint for the digest mock | ||
| mockChecksumProcessor.digest.mockReturnValue(BigInt(`0x${expectedChecksum}`)); |
Contributor
There was a problem hiding this comment.
check if necessary , maybe you can just generate random hash or number if needed with faker
| ); | ||
| }); | ||
|
|
||
| it('should handle checksum processor without reset method', async () => { |
Contributor
There was a problem hiding this comment.
please check this case - if reset is not exsits doesnt it mean hash state doesnt changed and hash result will the same for each of the files?
Contributor
Author
There was a problem hiding this comment.
We talked, it doesn't affect as we reconstruct the entity for each checksum calculation. You said you will resolve this with Vit.
CL-SHLOMIKONCHA
approved these changes
Dec 11, 2025
razbroc
added a commit
that referenced
this pull request
Dec 11, 2025
* refactor: merge alpha branch to latest retryValidations feature checks and error handling * style: lint * fix: fix opneapi yaml * test: lower threshold temporarly - add tests on seperate pr * style: lint * refactor: rename IJobRequestParams to IRetryRequestParams and update ValidationTaskParameters interface * refactor: update RetryLayerHandler type to use IRetryRequestParams * style: format constructor and interface for consistency * refactor: make new and update use redundant ChecksumValidationParameters in IngestionManager * refactor: replace ValidationTaskParameters with ChecksumValidationParameters in job request functions * style: simplify type definition in createNewJobRequest function * chore: update tsconfig.build.json for type inclusion * refactor: add more validations and renaming * fix: update error message for bad request in SuccessfulIngestionResponse * test: integrate ZodValidator for IngestionManager tests * fix: enhance checksum validation and update job status handling in IngestionManager * test: update checksum handling in retryIngestion tests for better clarity and accuracy * fix: absolute path handling in retryIngestion method * refactor: remove unused inputFilesSchema import from interfaces * fix: update tag for validateGpkgs operation from ingestion to validate * style: lint fix * chore: update @map-colonies/raster-shared version to ^7.3.0-alpha.1 * fix: update import and usage of ingestionValidationTaskParamsSchema in interfaces * chore: update dependencies in package-lock.json * chore: fix alpha version * chore: github action fix try * chore: tsconfig typeroot fix * chore: revert root defintion ts * chore: Remove unused type definitions for hapi plugins and update TypeScript configuration * chore: attemp to handle this freaking hapi cat issue * chore: add back SourceValidator to IngestionManager and its tests * style: fix lint * refactor: improve file validation and job reset logic in IngestionManager * chore: add polygonPartsManagerURL to configuration files * feat: enhance retryIngestion logic and integrate polygonPartsManagerClient to delete validation table * feat: implement PolygonPartsManagerClient with deleteValidationEntity method * fix: update callbackUrls schema reference in newLayerSchema and updateLayerSchema * fix: update RetryIngestionHandler type to return void instead of ResponseId * fix: refactor retryIngestion logic for improved readability and maintainability and linting * fix: correct indentation and formatting in openapi3.yaml for improved readability * fix: simplify checksum comparison logic and enhance logging in IngestionManager * fix: update type reference for links in IngestionManager to improve type safety * test: fix tests, add new mocks and make small refactors * fix: correct parameter name from 'links' to 'link' in ValidationTaskParameters for consistency * fix: update version of @map-colonies/raster-shared to v7.6.0-alpha.1 * fix: update @map-colonies/raster-shared dependency to allow patch updates * fix: correct variable name for updated checksums and change log level to debug for checksum calculations * refactor: modify logic for triggering soft and hard rest. modifying isValid approach to optional * refactor: extract input files validation logic into a separate method and rename reset method for clarity * style: lint * test: replace updateJob and updateTask calls with resetJob in retryIngestion tests * refactor: update validation task parameters to include optional isValid field and adjust related logic in IngestionManager * test: update status in retryIngestion test from FAILED to COMPLETED * refactor: update imports and enhance type definitions in IngestionManager and interfaces * test: include reason field in job update assertions in retryIngestion tests * style: improve logging messages for clarity and consistency in IngestionManager * feat: add POLYGON_PARTS_MANAGER_URL to ConfigMap for service URL configuration * feat: add parseAndValidateJobIdentifiers method and update resourceId handling in IngestionManager * style: update event names for validation success and reset actions in IngestionManager * style: streamline softReset method logging and tracing for improved readability * chore: update raster-shared so changing variables accordingly * test: shapeup * test: enhance task parameters validation in IngestionManager tests * test: retry layer api - integration tests (#48) * test: add retry ingestion corresponding tests * style: adjust formatting in IngestionRequestSender constructor and update bad request test cases for ingestion * style: improve formatting in IngestionRequestSender constructor and update test case descriptions for clarity * test: add polygonPartsManagerURL to default test configuration * style:lint * fix: handle NotFoundError and improve input file path handling in ingestion process + fix tests * test: update job reset descriptions for clarity in ingestion tests * test: refactor bad request test cases for ingestion API to improve clarity and structure * style: lint * chore: revet coverage to original * test: update coverage threshold for statements in jest configuration and add checksum unit test * test: update jest configuration for unused schema and adjust coverage statements * style: lint * feat: changed all shapefiles path inside parameters to be relative * chore: upgrade raster shared (#49) * chore: update to new raster-shared * refactor: remove unused validationTaskParametersSchema and update validation logic to use ingestionValidationTaskParamsSchema * refactor: remove unused checksumSchema import from interfaces * feat: add generateFullChecksum function and update usages in IngestionManager tests * Refactor ingestion tests to improve validation cases and adjust mock data generation - Updated bad request test cases in ingestion.spec.ts to ensure comprehensive coverage of input validation scenarios. - Adjusted the count of regions in metadata generation to a maximum of 5 instead of 100 for better test performance. - Modified input files generation to limit gpkgFilesPath to a single file for more controlled testing. - Ensured consistency in file path generation across various mock functions. * style: lint * feat: remove unused generateChecksum import in ingestionManager tests * refactor: rename getFilesChecksum to getChecksum and update usages * refactor: update validation task parameters to use IngestionValidationTaskParams and remove unused imports * refactor: remove trailing whitespace in interfaces.ts * test: fix pr comments - update error handling and checksum generation in tests * test: remove excessive timeout from nonexistent file response test * test: update error handling to throw NotFoundError instead of FileNotFoundError * fix: update coverage threshold for statements in jest config --------- Co-authored-by: shlomiko <shlomiko@rafael.co.il> --------- Co-authored-by: shlomiko <shlomiko@rafael.co.il>
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.
