-
Notifications
You must be signed in to change notification settings - Fork 120
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
BGZTK0127E Unable to access file for "external" copybook in SearchPathImpactFinder #305
Comments
It seems that the issue is related to the calculation of the access path to the impacting copybook. Have you checked the applicationSrcDirs configuration to ensure that it is correct and points to the correct locations of the copybooks? It is also possible that there is an issue with the impactSearch configuration. You may want to double-check these configurations and see if they are correctly specified. It might also be helpful to compare the configurations between DBB 1.1.0 and DBB 1.1.3 to see if there are any changes that could be causing the issue. |
I share your guess, @FALLAI-Denis, that the root cause is in the identification of the relative path of the modified file. To calculate the correct offset is tricky - especially when you provide multiple applicationSrcDirs. We had added another scenario about 10 months ago. Please review the git blame for the It can be a scripting issue with the new scenario or a change in the groovy runtime (DBB 1.1.3 includes Groovy 4.0). https://github.com/IBM/dbb-zappbuild/blame/2.5.2/utilities/ImpactUtilities.groovy#L993 |
Hi, Adding some "println" in
I think the case where external projects (External Git Repositories) are stored inside the main project tree (Main Git Repository) is not provided for in the xxxx routine. In terms of folder organization we have:
This organization is similar to that of Git submodules (but with a proprietary implementation): Git Tools - Submodules |
add a check at the beginning of scenario 2 to see if the .imports directory is present in the file path. If it is, you can continue with scenario 2 as it is implemented.
If it is not, you can return the path constructed using props.workspace + fixedFileName instead, as this should be the correct path for a file in the main project tree.
|
Hi, We applied a solution similar to the one proposed: hard test the presence of ".imports" in the path, which is specific to our use case...
However, I think that there should be a thorough reflection and a solution that takes into account the use of several nested Git repositories (use case of submodules in Git). |
@FALLAI-Denis, One approach you could take is to use the git ls-files command to list the files in the Git repository and then parse the output to determine the correct file path.
|
@FALLAI-Denis You are correct, Scenario 2 is not correctly selected, but the criteria for this scenario is met. Your scenario sound actually to be Scenario 4. I think, you would just need to reorder the scenarios and move Scenario 4 before Scenario 2. Would you mind to try this? |
Hi, I will try to make a diagram to explain the organization of our Workspace for DBB by positioning the different variables used by the zAppbuild scripts. |
Hi,
We have been running DBB 1.1.0 for a while and have just upgraded to DBB 1.1.3.
zAppbuild has been upgraded with the 2.5.2 package.
fullBuild
andimpactBuild
worked fine in DBB 1.1.0 and zAppbuid before 2.5.2.With version DBB 1.1.3 and zAppbuid 2.5.2 the
fullBuild
works, but theimpactBuild
triggers an error on the calculation of an access path to an impacting copybook.In a Repository to build, we have the following configuration:
The subfolders
ENVIRONN
andGCL
under${application}/.imports
are actually imported Git Repositories containing the copybooks used by the COBOL programs of the main Git Repository corresponding to${application}
.We are obliged to declare them in
applicationSrcDirs
so that theimpactBuild
detects the changes on the contained copybooks.A copybook located in a subfolder of
${application}/.imports/ENVIRONN
is modified.This copybook impacts a COBOL source located in a subfolder of
${application}/src
and which by itself is not modified.Command executed:
groovyz /var/DBB/MAINT/SCRIPTS/buildBPCE.groovy -w /SYSTEM/var/tmp/DBB/JENKINS/workspace/CEH49-CEAB3-20230105-181754/master -a ceab3-environn-outinfr-central-mvp2 -h GTEMP.JENKINS.CEAB3.MVP2.M -o /var/DBB/MAINT/LOGS/dbb-logs --impactBuild --verbose
zAppbuild detects the change on the copybook in
${application}/.imports/ENVIRONN
:At this stage, the path to the copybook should have been:
.imports/ENVIRONN/src/bloc/COPYCOB/S9FDI902.cpy
, notENVIRONN/src/bloc/COPYCOB/S9FDI902.cpy
?Is this the cause of the error that occurs afterwards?
A copybook usage impact search is triggered, but it throws an error in the routine
SearchPathImpactFinder
:In the detail of the stack, we see that the access path to the copybook has been incorrectly calculated:
/SYSTEM/var/tmp/DBB/JENKINS/workspace/CEH49-CEAB3-20230105-181754/master/ENVIRONN/src/bloc/COPYCOB/S9FDI902.cpy
instead of:
/SYSTEM/var/tmp/DBB/JENKINS/workspace/CEH49-CEAB3-20230105-181754/master/.imports/ENVIRONN/src/bloc/COPYCOB/S9FDI902.cpy
The text was updated successfully, but these errors were encountered: