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

C2C-305: Add openmrs, bahmni and odoo configs locally and fix pom.xml #17

Merged
merged 8 commits into from
Nov 5, 2024

Conversation

VaishSiddharth
Copy link
Contributor

Copy link
Member

@Ruhanga Ruhanga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @VaishSiddharth. I have one comment to address: I suggest organizing the relevant folder structure like this:

configs/
├── bahmni/
│   ├── frontend/
│   │   └── openmrs/
│   └── .../
├── odoo/
│   └── initializer_config/
│   └── .../
└── openmrs/
    └── initializer_config/
    └── .../

@rbuisson
Copy link
Member

@Ruhanga , for now, let's keep the same structure as it was before. The task is only to move the configs "as is" into the distros.

@rbuisson
Copy link
Member

@VaishSiddharth , let me correct myself, let's rework the structure to be as per @Ruhanga 's comment. (I didn't know it was already done for TLC)

configs/
|-- openmrs/
|-- odoo/
|-- bahmni/

@rbuisson
Copy link
Member

@VaishSiddharth did you verify the contents of the final package to make sure they're identical with the latest distro package?
If not, this command will help: diff -qr /path/to/folder1 /path/to/folder2

@VaishSiddharth
Copy link
Contributor Author

VaishSiddharth commented Sep 27, 2024

@rbuisson @Ruhanga have fixed the structure and tested master and this branch build (target) folders with diff -qr command
Only difference is in SNAPSHOT.zip folders that must be because the command cannot find whats inside the zip folder.
Also the folder naming is a bit different

configs/
|-- openmrs_config/
|-- odoo_config/
|-- bahmni_config/
|-- analytics_config/

@Ruhanga
Copy link
Member

Ruhanga commented Sep 27, 2024

configs/
|-- openmrs_config/
|-- odoo_config/
|-- bahmni_config/
|-- analytics_config/

I don't think the trailing _config is necessary especially if the parent folder is already named configs. Something like below would be more consistent with what we've done already implemented as shared in the previous comments.

configs/
|-- openmrs/
|-- odoo/
|-- bahmni/
|-- analytics/

@VaishSiddharth
Copy link
Contributor Author

Agreed @Ruhanga. Fixed the folder names. Thanks for pointing out that it is redundant

Copy link
Member

@Ruhanga Ruhanga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, it looks great. I have just two comments below:

pom.xml Outdated
<directory>${project.basedir}/configs/openmrs_config</directory>
<directory>${project.basedir}/configs/openmrs</directory>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be additional types of configurations for OpenMRS, so it would be reasonable to allow for this, such as:
directory>${project.basedir}/configs/openmrs/initializer</directory>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done for odoo and openmrs configs.

pom.xml Outdated
@@ -106,7 +106,7 @@
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.basedir}/configs/odoo_config</directory>
<directory>${project.basedir}/configs/odoo</directory>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be additional types of configurations for Odoo, so it would be reasonable to allow for this, such as:
directory>${project.basedir}/configs/odoo/initializer</directory>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done for odoo and openmrs configs.

@rbuisson
Copy link
Member

@Ruhanga @VaishSiddharth are you saying we also rename the final package folders to:

configs/
|-- openmrs/
|-- odoo/
|-- bahmni/
|-- analytics/

Because if so, then this will quite have an impact on deployment (as for mounting the volumes).

@VaishSiddharth
Copy link
Contributor Author

No the build is identical apart from these files/folder

Files new/target/bahmni-distro-c2c-1.7.0-SNAPSHOT.zip and old/target/bahmni-distro-c2c-1.7.0-SNAPSHOT.zip differ
Only in old/target/dependency-maven-plugin-markers: net.mekomsolutions-bahmni-config-c2c-zip-1.4.0-SNAPSHOT.marker
Only in old/target/dependency-maven-plugin-markers: net.mekomsolutions-odoo-config-c2c-zip-1.7.0-SNAPSHOT.marker
Only in old/target/dependency-maven-plugin-markers: net.mekomsolutions-openmrs-config-c2c-zip-1.7.0-SNAPSHOT.marker

@rbuisson
Copy link
Member

@Ruhanga , did you try to run the distro on this PR?

@Ruhanga
Copy link
Member

Ruhanga commented Oct 15, 2024

@rbuisson no, I'll give it a try and comment. There were a few things that have now been addressed.

Copy link
Member

@Ruhanga Ruhanga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good. Building this fails with the error below + one minor concern to address below

main:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.877 s
[INFO] Finished at: 2024-10-15T14:15:07+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (rename-openmrs-config) on project bahmni-distro-c2c: An Ant BuildException has occured: ~/bahmni-distro-c2c/target/bahmni-distro-c2c-1.7.0-SNAPSHOT/openmrs_config does not exist.
[ERROR] around Ant part ...<move todir="~/bahmni-distro-c2c/target/bahmni-distro-c2c-1.7.0-SNAPSHOT/openmrs_config">... @ 4:128 in ~/bahmni-distro-c2c/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

pom.xml Show resolved Hide resolved
Copy link
Member

@Ruhanga Ruhanga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rbuisson rbuisson merged commit 73563a0 into master Nov 5, 2024
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.

3 participants