-
Notifications
You must be signed in to change notification settings - Fork 9
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
[MODEXPS-273] Improve logging for job launching process #610
base: master
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
.listener(listener) | ||
.start(steps[0]); | ||
for (int i = 1; i < steps.length; i++) { | ||
builder = builder.next(steps[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit harder to understand the sequence now, need to find where steps are declared in this case, but can leave if you prefer to leave
var ediExportConfig = ediObjectMapper.readValue((String)jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class); | ||
var edifactOrderAsString = (String) ExecutionContextUtils.getExecutionVariable(stepExecution,"edifactOrderAsString"); | ||
var ediExportConfig = ediObjectMapper.readValue((String) jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class); | ||
if (ediExportConfig.getIntegrationType() != ORDERING && ediExportConfig.getTransmissionMethod() != FILE_DOWNLOAD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to minio we should save in any case for both transition methods: File download, and FTP.
We will upload that file into Minio and after this will transfer to Ftp if transitionMethod is Ftp.
But it is required to have file in Minio in any case
return configurationClient.getConfigById(configId); | ||
} catch (NotFoundException e) { | ||
logger.error("getConfigById:: Couldn't fetch configuration entry by id: '{}'", configId, e); | ||
throw new NotFoundException("Configuration entry not found for id: " + configId, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just do throw e
Or you need an another text in the excpetion message?
ftpStorageService.uploadToFtp(ediExportConfig, fileContent, FilenameUtils.getName(uploadedFilePath)); | ||
|
||
var stepExecution = chunkContext.getStepContext().getStepExecution(); | ||
var fileName = (String) ExecutionContextUtils.getExecutionVariable(stepExecution, EDIFACT_FILE_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we rename to ACQ_EXPORT_FILE_NAME? In this case we will have the same convention as for ACQ_EXPORT_FILE
var ediExportConfig = ediObjectMapper.readValue((String)jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class); | ||
var uploadedFilePath = (String) ExecutionContextUtils.getExecutionVariable(stepExecution, UPLOADED_FILE_PATH); | ||
var ediExportConfig = ediObjectMapper.readValue((String) jobParameters.get(EDIFACT_ORDERS_EXPORT), VendorEdiOrdersExportConfig.class); | ||
if (ediExportConfig.getIntegrationType() != ORDERING && ediExportConfig.getTransmissionMethod() != FTP) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit hard to read with inverse conditions. Also having integration type here will lead us to modify source code of tasklet during adding new integration type. If we could not do such inverse configuration on some higher config level - we can leave as it.
Purpose
https://folio-org.atlassian.net/browse/MODEXPS-273
Approach