-
Notifications
You must be signed in to change notification settings - Fork 2
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
[BUG] metadata extraction regex for s2 l2 is missing #900
Comments
The workaround is pending in the rs-config : https://github.com/COPRS/rs-config/pull/125 |
The workaround was deployed and products are well ingested in the MDC. |
IVV_CCB_2023_w15 : Moved into "Accepted Werum", Priority minor (workaround). This update have to be done into Werum default conf |
Werum_CCB_2023_w15 : Moved into "Sprint Backlog", seems to be easy to fix |
Added fix to default configuration. Will be included in next delivery. |
This issue was tackled in V1.13.1 and thus will be contained in V2. |
To_validate_CCB_2023_w24 : To be tested by @nleconte-csgroup |
Fix is well delivered since 1.13.1 : COPRS/production-common@571091b |
IVV_CCB_2023_w28 : Validated, closed (V1.13.1) |
Environment:
Test:
Current Behavior:
The metadata extraction is failing for the Sentinel 2 Level product due to wrong regex :
https://github.com/COPRS/production-common/blob/29e50e259b79b02537a6530882a6162e245b149e/processing-common/metadata/content/stream-parameters.properties#L52
app.metadata-extraction.worker.product-categories.s2-products.pattern-config=^(S2)(A|B|_)_([A-Z0-9]{4})_((MSI)_(L0_|L1A|L1B|L1C)_(GR|DS|TL|TC)|PRD_HKTM__)_\\w{0,4}_?(\\d{8}T\\d{6})(.*)$
It is missing
L2A
.Expected Behavior:
The metadata extraction worker shall handle the L2A products.
Steps To Reproduce:
Test execution artefacts (i.e. logs, screenshots…)
{"header":{"type":"LOG","timestamp":"2023-04-05T12:46:37.599119Z","level":"ERROR","line":250,"file":"LogAccessor.java","thread":"KafkaConsumerDestination{consumerDestinationName='metadata-catalog-part1.metadata-filter', partitions=6, dlqName='error-warning'}.container-0-C-1"},"message":{"content":"org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.cloud.stream.function.FunctionConfiguration$FunctionToDestinationBinder$1@666f6c1e]; nested exception is java.lang.RuntimeException: esa.s1pdgs.cpoc.common.errors.processing.MetadataFilePathException: Description extraction failed: File S2B_OPER_MSI_L2A_DS_REFS_20230405T124601_S20230325T203106_N04.00 does not match the configuration file pattern ^(S2)(A|B|_)_([A-Z0-9]{4})_((MSI)_(L0_|L1A|L1B|L1C)_(GR|DS|TL|TC)|PRD_HKTM__)_\\w{0,4}_?(\\d{8}T\\d{6})(.*)$, failedMessage=GenericMessage [payload=byte[581], headers={deliveryAttempt=3, kafka_timestampType=CREATE_TIME, kafka_receivedTopic=metadata-catalog-part1.metadata-filter, target-protocol=kafka, b3=f619e3264f40044f-851e7fa270db8076-0, nativeHeaders={b3=[f619e3264f40044f-851e7fa270db8076-0]}, skip-input-type-conversion=false, kafka_offset=657159, scst_nativeHeadersPresent=true, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@6543de62, kafka_receivedPartitionId=0, contentType=application/json, kafka_receivedTimestamp=1680698787532, kafka_groupId=metadata-catalog-part1}]\n\tat org.springframework.integration.support.utils.IntegrationUtils.wrapInHandlingExceptionIfNecessary(IntegrationUtils.java:191)\n\tat org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:65)\n\tat org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:115)\n\tat org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:133)\n\tat org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:106)\n\tat org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:72)\n\tat org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:317)\n\tat org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:272)\n\tat org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187)\n\tat org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166)\n\tat org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)\n\tat org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)\n\tat org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:216)\n\tat org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter.sendMessageIfAny(KafkaMessageDrivenChannelAdapter.java:397)\n\tat org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter.access$300(KafkaMessageDrivenChannelAdapter.java:83)\n\tat org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter$IntegrationRecordMessageListener.onMessage(KafkaMessageDrivenChannelAdapter.java:454)\n\tat org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter$IntegrationRecordMessageListener.onMessage(KafkaMessageDrivenChannelAdapter.java:428)\n\tat org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.lambda$onMessage$0(RetryingMessageListenerAdapter.java:125)\n\tat org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:329)\n\tat org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:255)\n\tat org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.onMessage(RetryingMessageListenerAdapter.java:119)\n\tat org.springframework.kafka.listener.adapter.RetryingMessageListenerAdapter.onMessage(RetryingMessageListenerAdapter.java:42)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeOnMessage(KafkaMessageListenerContainer.java:2629)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeOnMessage(KafkaMessageListenerContainer.java:2609)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:2536)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:2427)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:2305)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:1979)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeIfHaveRecords(KafkaMessageListenerContainer.java:1364)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1355)\n\tat org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1247)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.lang.RuntimeException: esa.s1pdgs.cpoc.common.errors.processing.MetadataFilePathException: Description extraction failed: File S2B_OPER_MSI_L2A_DS_REFS_20230405T124601_S20230325T203106_N04.00 does not match the configuration file pattern ^(S2)(A|B|_)_([A-Z0-9]{4})_((MSI)_(L0_|L1A|L1B|L1C)_(GR|DS|TL|TC)|PRD_HKTM__)_\\w{0,4}_?(\\d{8}T\\d{6})(.*)$\n\tat esa.s1pdgs.cpoc.metadata.extraction.service.ExtractionService.apply(ExtractionService.java:108)\n\tat esa.s1pdgs.cpoc.metadata.extraction.service.ExtractionService.apply(ExtractionService.java:57)\n\tat org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.invokeFunctionAndEnrichResultIfNecessary(SimpleFunctionRegistry.java:897)\n\tat org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.invokeFunction(SimpleFunctionRegistry.java:853)\n\tat org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.doApply(SimpleFunctionRegistry.java:708)\n\tat org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.apply(SimpleFunctionRegistry.java:551)\n\tat org.springframework.cloud.stream.function.PartitionAwareFunctionWrapper.apply(PartitionAwareFunctionWrapper.java:84)\n\tat org.springframework.cloud.stream.function.FunctionConfiguration$FunctionWrapper.apply(FunctionConfiguration.java:754)\n\tat org.springframework.cloud.stream.function.FunctionConfiguration$FunctionToDestinationBinder$1.handleMessageInternal(FunctionConfiguration.java:586)\n\tat org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:56)\n\t... 32 more\nCaused by: esa.s1pdgs.cpoc.common.errors.processing.MetadataFilePathException: Description extraction failed: File S2B_OPER_MSI_L2A_DS_REFS_20230405T124601_S20230325T203106_N04.00 does not match the configuration file pattern ^(S2)(A|B|_)_([A-Z0-9]{4})_((MSI)_(L0_|L1A|L1B|L1C)_(GR|DS|TL|TC)|PRD_HKTM__)_\\w{0,4}_?(\\d{8}T\\d{6})(.*)$\n\tat esa.s1pdgs.cpoc.metadata.extraction.service.extraction.files.FileDescriptorBuilder.buildS2FileDescriptor(FileDescriptorBuilder.java:281)\n\tat esa.s1pdgs.cpoc.metadata.extraction.service.extraction.S2ProductMetadataExtractor.extract(S2ProductMetadataExtractor.java:64)\n\tat esa.s1pdgs.cpoc.metadata.extraction.service.ExtractionService.handleMessage(ExtractionService.java:136)\n\tat esa.s1pdgs.cpoc.metadata.extraction.service.ExtractionService.apply(ExtractionService.java:105)\n\t... 41 more\n"},"custom":{"logger_string":"org.springframework.integration.handler.LoggingHandler"}}
Whenever possible, first analysis of the root cause
Regex is wrong and the L2A part is missing.
Bug Generic Definition of Ready (DoR)
Bug Generic Definition of Done (DoD)
The text was updated successfully, but these errors were encountered: