You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ad...@apache.org on 2025/04/24 12:31:58 UTC

(fineract) branch develop updated: FINERACT-2269: various small dev-focused improvements

This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 834e90dce0 FINERACT-2269: various small dev-focused improvements
834e90dce0 is described below

commit 834e90dce05620ac5cba5d0a338d8321729d43ba
Author: Adam Monsen <ha...@gmail.com>
AuthorDate: Tue Apr 15 14:47:06 2025 -0700

    FINERACT-2269: various small dev-focused improvements
    
    remove unnecessary javadoc html5 option
    
    html5 output is the default since at least Java 17
    
    improve markdown formatting for PR template
    
    fix casing, per GH recommendations
    
    https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository recommends lowercase
    
    document system default Java issues
    
    reorder integration test hints importance-wise
    
    make devRun the default
    
    It's faster and more obviously useful for developers.
    
    See https://lists.apache.org/thread/zxvtx9nqqbojvt0dd65tk8zd4xp6ot0t
    
    mention gradle not re-running tests
    
    remove Gitpod
    
    per James, Ádám, and Victor, this is no longer used/supported
    
    for setting up a local dev environment see the top-level README.md and https://fineract-academy.com
---
 ...EQUEST_TEMPLATE.MD => pull_request_template.md} |  6 ---
 .gitpod.yml                                        | 45 ----------------------
 README.md                                          | 43 +++++++++++++++++----
 build.gradle                                       |  7 ----
 fineract-war/build.gradle                          |  2 +-
 5 files changed, 37 insertions(+), 66 deletions(-)

diff --git a/.github/PULL_REQUEST_TEMPLATE.MD b/.github/pull_request_template.md
similarity index 99%
rename from .github/PULL_REQUEST_TEMPLATE.MD
rename to .github/pull_request_template.md
index c9bc2e3d0c..f45f563fbb 100644
--- a/.github/PULL_REQUEST_TEMPLATE.MD
+++ b/.github/pull_request_template.md
@@ -4,21 +4,15 @@ Describe the changes made and why they were made.
 
 Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
 
-
 ## Checklist
 
 Please make sure these boxes are checked before submitting your pull request - thanks!
 
 - [ ] Write the commit message as per https://github.com/apache/fineract/#pull-requests
-
 - [ ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
-
 - [ ] Create/update unit or integration tests for verifying the changes made.
-
 - [ ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
-
 - [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
-
 - [ ] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the developer mailing list for guidance, if required.)
 
 FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
diff --git a/.gitpod.yml b/.gitpod.yml
deleted file mode 100644
index d6630775c0..0000000000
--- a/.gitpod.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# https://www.gitpod.io
-# https://www.gitpod.io/docs/41_Config_Gitpod_File/
-# https://github.com/gitpod-io/workspace-images/tree/master/mysql
-#
-# FIXME - dead code? see https://github.com/apache/fineract/pull/4590#issuecomment-2809760331
-
-image: gitpod/workspace-mysql:2022-08-04-13-40-17
-ports:
-- port: 3306
-  onOpen: ignore
-- port: 8005
-  onOpen: ignore
-- port: 8009
-  onOpen: ignore
-- port: 8080
-- port: 8081
-  onOpen: ignore
-- port: 8443
-tasks:
-- command: |
-      # NB MySQL on GitPod.io is currently quite slow.
-      # Using authentication_string= instead of password= due to mysql major version difference
-      mysql -e "USE mysql;\nUPDATE user SET authentication_string=PASSWORD('mysql') WHERE user='root';\nFLUSH PRIVILEGES;\n"
-      ./gradlew createDB -PdbName=fineract_tenants
-      ./gradlew createDB -PdbName=fineract_default
-      ./gradlew build -x test
-  init: sdk default java 17.0.4.fx-zulu
diff --git a/README.md b/README.md
index 7a56d6b7fc..ee08ae125f 100644
--- a/README.md
+++ b/README.md
@@ -12,11 +12,6 @@ Fineract is a mature platform with open APIs that provides a reliable, robust, a
 
 [Have a look at the FAQ on our Wiki at apache.org](https://cwiki.apache.org/confluence/display/FINERACT/FAQ) if this README does not answer what you are looking for.  [Visit our JIRA Dashboard](https://issues.apache.org/jira/secure/Dashboard.jspa?selectPageId=12335824) to find issues to work on, see what others are working on, or open new issues.
 
-[![Code Now! (Gitpod)](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/apache/fineract)
-to start contributing to this project in the online web-based IDE GitPod.io right away!
-(You may initially have to press F1 to Find Command and run "Java: Start Language Server".)
-It's of course also possible to contribute with a "traditional" local development environment (see below).
-
 COMMUNITY
 =========
 
@@ -72,7 +67,7 @@ __RECOMMENDATION__: you need to shift all dates in your database by the timezone
 Run the following commands:
 1. `./gradlew createDB -PdbName=fineract_tenants`
 1. `./gradlew createDB -PdbName=fineract_default`
-1. `./gradlew bootRun`
+1. `./gradlew devRun`
 
 
 <br>INSTRUCTIONS: How to build the JAR file
@@ -170,7 +165,24 @@ Right now we depend on GitHub to know if "the build" is passing (it's actually m
 The authoritative source of truth for what commands/services/tests to run, how, and when are the files in `.github/workflows/`.
 Output from runs based on those configuration files appears at <https://github.com/apache/fineract/actions>.
 
-Note these builds are run in [short-lived virtual machines](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners), so locally reproducing the same may require additional effort, such as these extra clean-up procedures:
+Incorrect default Java-related executables may cause test failures.
+To fix this on Debian and Ubuntu systems, run the following:
+
+```bash
+export JAVA_HOME=/usr/lib/jvm/zulu21
+sudo update-alternatives --set java $JAVA_HOME/bin/java
+sudo update-alternatives --set javac $JAVA_HOME/bin/javac
+sudo update-alternatives --set javadoc $JAVA_HOME/bin/javadoc
+```
+
+This would correct, for example, a [class file verson error](https://en.wikipedia.org/wiki/Java_class_file#General_layout).
+You might see something like this if a Java 11 executable (class file format version 56) was the system default, but the integration tests were using Java 21 (class file format version 65):
+
+```
+UnsupportedClassVersionError: com.example.package/ClassName has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 55.0
+```
+
+These builds are run in [short-lived virtual machines](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners), so locally reproducing the same may require additional effort, such as these extra clean-up procedures:
 
 ```bash
 # Destroy anything untracked by git.
@@ -186,6 +198,23 @@ rm -rf ~/.gradle ~/.m2 /tmp/cargo*
 ps auxwww | grep [c]argo | awk '{ print $2 }' | xargs -r kill
 ```
 
+Integration test runs such as `./gradlew --no-daemon --console=plain test -x :twofactor-tests:test -x :oauth2-test:test :fineract-e2e-tests-runner:test -PdbType=postgresql` in `.github/workflows/build-postgresql.yml` often take an hour or longer to complete.
+If you notice the `:integration-tests:test` task taking significantly less time, say, one minute, gradle may be skipping it.
+Look for something like this in the test output:
+
+```
+> Task :integration-tests:test UP-TO-DATE 👀
+Custom actions are attached to task ':integration-tests:test'.
+Build cache key for task ':integration-tests:test' is 6aeeec3f58bf9703d4c100fbaa657f5c
+Skipping task ':integration-tests:test' as it is up-to-date.
+Resolve mutations for :integration-tests:cargoStopLocal (Thread[Execution worker Thread 11,5,main]) started.
+:integration-tests:cargoStopLocal (Thread[Execution worker Thread 11,5,main]) started.
+```
+
+(This is with the `--info` gradle argument with eyeballs added for emphasis)
+The `--rerun-tasks` gradle argument may help, or you can try destroying `~/.gradle` and other clean-up procedures as indicated above then re-running tests.
+This is useful for repeated test runs (say, for timing) when gradle would otherwise assume a task is "up-to-date" and not re-run it.
+
 Testing within IDEs
 -----------------
 
diff --git a/build.gradle b/build.gradle
index 86099a6c72..a193b8a910 100644
--- a/build.gradle
+++ b/build.gradle
@@ -739,13 +739,6 @@ configure(project.fineractJavaProjects) {
     tasks.withType(Javadoc) {
         options.addStringOption('Xdoclint:none', '-quiet')
         options.encoding = 'UTF-8'
-        // FIXME - html5 is the default since sometime before Java 17
-        // Disable strict checking to prevent build failures on invalid javadoc
-        options.addBooleanOption('html5', true)
-        // Add this if you're using Java 21 records or other modern features
-        if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21)) {
-            options.addBooleanOption('html5', true)
-        }
         // Ignore any errors during javadoc generation
         failOnError = false
     }
diff --git a/fineract-war/build.gradle b/fineract-war/build.gradle
index c7a29aad0e..93b12e4226 100644
--- a/fineract-war/build.gradle
+++ b/fineract-war/build.gradle
@@ -145,7 +145,7 @@ distributions {
             from("$rootDir/") {
                 exclude '**/build' , '.git', '**/.gradle', '.github', '**/.settings', '**/.project', 
                         '**/.classpath', '.idea', 'out', '._.DS_Store', '.DS_Store', 'WebContent', 
-                        '**/.externalToolbuilders', '.theia', '.gitpod.yml', 'LICENSE_RELEASE', 
+                        '**/.externalToolbuilders', '.theia', 'LICENSE_RELEASE', 
                         'NOTICE_RELEASE', '**/licenses', '*.class', '**/bin', '*.log', '.dockerignore', 
                         '**/.gitkeep'