Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
fc86b6a
Add a shared lib for use between BELY and CDB for MQTT integration an…
iTerminate Oct 2, 2026
5077539
Add scripts to create and deploy mqtt connection configuration
iTerminate Oct 2, 2026
b15f007
Add libs required for mqtt connection.
iTerminate Oct 2, 2026
b3b5498
the shared lib also contains the base mqttEvent.
iTerminate Oct 2, 2026
373eb84
Refactor rename the shared lib to base-cdb-mqtt
iTerminate Oct 2, 2026
719e160
Refactor rename the shared lib to base-cdb-mqtt
iTerminate Oct 2, 2026
fc2a49a
Initial MQTT integration base
iTerminate Oct 2, 2026
0136ccd
Run tests upon changes to the lib.
iTerminate Oct 2, 2026
ed435e4
Run tests in CI upon changes to the lib.
iTerminate Oct 2, 2026
deb9f0e
Merge branch 'master' into mqtt
iTerminate Nov 5, 2026
a0523d9
Add support for adding "specailized" specific change events.
iTerminate Nov 5, 2026
49e325a
Add new property changes events.
iTerminate Nov 5, 2026
6ca76f0
Refactor textOmmitted for clarity
iTerminate Nov 5, 2026
4c17757
Hook property value changes into generation of property value history.
iTerminate Nov 5, 2026
76dbddb
Add appropriate events based on changes that have been populated by p…
iTerminate Nov 5, 2026
688592c
Extend the test framework for the property events.
iTerminate Nov 5, 2026
d2fba9f
Add a base class for all cdb mqtt events.
iTerminate Nov 6, 2026
56aa8e2
Add a mqtt event classes for representing the machien design assigned…
iTerminate Nov 6, 2026
55bfc8b
Add hooks for adding event when changes to the assigned item in the m…
iTerminate Nov 6, 2026
7d097a9
Add unit tests for the new machine design assignment events.
iTerminate Nov 6, 2026
e3a37fa
Refactor to add PropertyValueChange into the new mqtt metadata package.
iTerminate Nov 6, 2026
a842d30
Add a new mqtt model for machine design move events.
iTerminate Nov 6, 2026
1ed3d61
Integrate event after the move update was performed.
iTerminate Nov 6, 2026
6bf3c99
Add unit tests
iTerminate Nov 6, 2026
0486730
Extend the model to expose the item entity type this contains informa…
iTerminate Nov 6, 2026
c7122ed
Add models to support the new machine design represented element chan…
iTerminate Nov 6, 2026
0523b9a
Hook the change into the assigned item history check.
iTerminate Nov 6, 2026
67b1aab
Add unit tests for the new functionality.
iTerminate Nov 6, 2026
064762e
Add a template metadata if a reprented element is updated via template.
iTerminate Nov 6, 2026
c6ceda2
Integrate propagation of item element representation to template mqtt…
iTerminate Nov 6, 2026
890b425
Add tests for represetned item elements
iTerminate Nov 6, 2026
df50326
Add enum for operation to keep the options consistent accross the app…
iTerminate Nov 6, 2026
54dcdf0
Add model to support trash mqtt eventss
iTerminate Nov 6, 2026
e4c036a
Hook the trash events into the standard workflows.
iTerminate Nov 6, 2026
e85d866
Add unit tests for new trash events
iTerminate Nov 6, 2026
5fbb916
Add location change mqtt event model
iTerminate Nov 6, 2026
ecc471b
Add location change mqtt event model
iTerminate Nov 6, 2026
74c9a7b
Hook location change into the location change workflow.
iTerminate Nov 6, 2026
9539199
Add tests for new location change workflow
iTerminate Nov 6, 2026
4facd5b
Add events for assembly element changes.
iTerminate Nov 6, 2026
ed0fadb
Hook assembly change into function where it gets updated.
iTerminate Nov 6, 2026
f7c6b1d
Add tests for updating assembly element mqtt events.
iTerminate Nov 6, 2026
ecacbc2
Resolve issue with delete event not being published
iTerminate Nov 6, 2026
42708e1
Move the detection of assembly changes to top level. Resolve assembly…
iTerminate Nov 6, 2026
0b32383
Add mqtt test framework setup
iTerminate Nov 9, 2026
55a49af
Add test for creating and removing entity. Add property add update test.
iTerminate Nov 9, 2026
bdf9fe0
Add inventory assembly assing/clear plus location update
iTerminate Nov 9, 2026
55d85e6
Add machine design move, update assigned item/represented item.
iTerminate Nov 9, 2026
833eae8
Extend to selenium to test Events not supported by API
iTerminate Nov 9, 2026
80a7c85
Fianlize test framework
iTerminate Nov 9, 2026
315fc92
add new shared functionality.
iTerminate Nov 9, 2026
ef4a89e
Expand the test coverage for machine design assigned update trash res…
iTerminate Nov 9, 2026
6361c3f
Add remaining topics to selenium tests.
iTerminate Nov 9, 2026
43f362c
extend the mqtt tests to basic make test as well
iTerminate Nov 9, 2026
477a0c6
Use the new standardized way for selecting catalog item.
iTerminate Nov 9, 2026
449f592
Add model to support addition of new machines
iTerminate Nov 12, 2026
1ddc425
Hook creation and publication of new models
iTerminate Nov 12, 2026
b10c8c5
Refactor specialized create events and specailized update events for …
iTerminate Nov 12, 2026
221327f
Add tests for machine design add events.
iTerminate Nov 12, 2026
868be4c
Extend the model to support template information when triggered from …
iTerminate Nov 12, 2026
7baf043
Hook into template creation
iTerminate Nov 12, 2026
751a1e8
Add tests for template creation machine events
iTerminate Nov 12, 2026
11d34de
Add model to support add update delete for log entries.
iTerminate Nov 12, 2026
1965f30
Add a shared utility for text diff between property and log text
iTerminate Nov 12, 2026
a78c134
Add new REST endpoints for update and delete log entry
iTerminate Nov 12, 2026
cf05486
Destroy is now called upon sucesful updateOnRemoval.
iTerminate Nov 12, 2026
7125ce9
Add hooks to publish log entry event changes.
iTerminate Nov 12, 2026
db9f9a0
Resolve template xpath
iTerminate Nov 12, 2026
4e800c1
Add tests for the new log entry mqtt events.
iTerminate Nov 12, 2026
d9b6ea0
Refactir to add a standardized way of adding attachments via the cont…
iTerminate Nov 12, 2026
6df8545
Hook in log utility for standard way of adding attachments
iTerminate Nov 12, 2026
8e06df5
Add model to capture log attachment changes
iTerminate Nov 13, 2026
fa5e46d
Attachments get identified by name instead of attachment id to simpli…
iTerminate Nov 13, 2026
5ddc48a
Hook attachment events into the item update cycle.
iTerminate Nov 13, 2026
8ed5a26
Add tests to verify attachment events get fired for mqtt
iTerminate Nov 13, 2026
e43c290
Add documentation for new tests
iTerminate Nov 13, 2026
7729297
Add combined log edit test
iTerminate Nov 13, 2026
ab1d407
Start release notes for 3.20 MQTT release
iTerminate Nov 13, 2026
2031a00
Update claude md to create release notes at the end of a plan.
iTerminate Nov 13, 2026
9a76e67
init commit move over the relevant base from BELY for the message broker
iTerminate Nov 18, 2026
9bde9a3
Generalize the message broker into a base for cdb and bely
iTerminate Nov 18, 2026
52e9a4a
Add github workflow
iTerminate Nov 18, 2026
32eb49a
run installation
iTerminate Nov 18, 2026
0935f49
Add py.typed marker and generic Enum typing to message broker base
iTerminate Nov 18, 2026
145dd8a
Add cdb specific message broker including the specific event models a…
iTerminate Nov 18, 2026
c42b364
Rename domain id for consistency with rest mqtt models
iTerminate Nov 18, 2026
b6362e8
Add documentaiton for the message broker
iTerminate Nov 18, 2026
1a824f2
Add test fixtures
iTerminate Nov 18, 2026
57e4e4d
Update release notes with the broker functionality.
iTerminate Nov 18, 2026
1bcaaef
Run linter
iTerminate Nov 18, 2026
03103ff
Add acceptnace tests for cdb-mqtt broker
iTerminate Nov 18, 2026
1fc31df
Refactor to use acutal cdb-mqtt start command in the acceptance tests
iTerminate Nov 18, 2026
4f2ccfa
Update support to latests payara and opendjk LTS 25
iTerminate Nov 20, 2026
7c6210f
Update the libs to support updated payara version.
iTerminate Nov 20, 2026
5d3c6b1
Update configuration per new deps
iTerminate Nov 20, 2026
4cd2bcf
Upgrade to using updated jakarta libs.
iTerminate Nov 20, 2026
7d9f48e
add note about hazelcast port occupied to change
iTerminate Nov 20, 2026
33793ba
Use appprpriate java for installation
iTerminate Nov 20, 2026
e2a2bc2
Primefaces migration start. Watermark is deprecated and replaced with…
iTerminate Nov 24, 2026
2e6d31a
Replace seperator with divider
iTerminate Nov 24, 2026
6415100
Filter options was removed for a filter facet. Add ability to support…
iTerminate Nov 24, 2026
1c331bb
Selection mode was replaced with selection box.
iTerminate Nov 24, 2026
6b15485
Add new validate file now that the file upload file options have been…
iTerminate Nov 24, 2026
1b309fd
The dialog style is not applied at the box level to not affect the wh…
iTerminate Nov 24, 2026
cecd3c7
Add tabular layout mode to the panel grid. Previously the default opt…
iTerminate Nov 24, 2026
00a5127
paginator position is a new options that needs to be defined.
iTerminate Nov 24, 2026
f772176
Resolve dialog box issue for the alter dialog.
iTerminate Nov 24, 2026
da80ba1
Resolve the metadata warnings
iTerminate Nov 24, 2026
7d7d012
Update shared libs to resotre additional functionality such as list x…
iTerminate Nov 24, 2026
b7c4f15
Resolve system log filterning not working
iTerminate Nov 24, 2026
61aa2e4
Resolve the test suite to work with updated deps
iTerminate Nov 24, 2026
f80eac6
Update mqtt connector for support for new payara
iTerminate Nov 24, 2026
75cd153
Resolve issue with property API tests.
iTerminate Nov 24, 2026
0d2f7cf
Use number type to accept any number
iTerminate Nov 24, 2026
40958a2
Update plugins to updated syntax.
iTerminate Nov 24, 2026
51d490f
Add compatability layer for dm jar.
iTerminate Nov 24, 2026
f34bbbd
Update documentation
iTerminate Nov 24, 2026
3417b64
Update references to latest version
iTerminate Nov 24, 2026
121474e
Resolve multipart form warnings from upload
iTerminate Nov 24, 2026
821d887
Remove lazy warnings
iTerminate Nov 24, 2026
a180211
Clean up lazy warnings
iTerminate Nov 24, 2026
f1764c3
Resolve layout issues after dialog update
iTerminate Nov 24, 2026
8d1cf22
Add improved logging in the test suite
iTerminate Nov 24, 2026
ad8360e
Remove the multi-part. Causes issues with other parts of the page.
iTerminate Nov 24, 2026
ec14e93
Collect logs for test failures to analize.
iTerminate Nov 24, 2026
17392ca
Update docs for setting up dev payara
iTerminate Nov 24, 2026
4b1b747
Capture context menu events to ensure updated permissions
iTerminate Nov 25, 2026
96d3669
Add handling of diabled elements.
iTerminate Nov 25, 2026
889ef09
Add improvement to wait for ajax idle in the test suite.
iTerminate Nov 25, 2026
ed11599
Clean up ignored attribures
iTerminate Nov 25, 2026
0a979d6
Clean up ignored rednered attributes
iTerminate Nov 25, 2026
35042a7
Resolve syntax errors
iTerminate Nov 25, 2026
b3ca126
value is required
iTerminate Nov 25, 2026
65d4a29
Resolve missing id
iTerminate Nov 25, 2026
76d2225
Use faces view scope instead of omnifaces. Resolves many view expired…
iTerminate Nov 25, 2026
e0181a5
Improve loading dialog detection
iTerminate Nov 25, 2026
c67bcb8
Restore modal dialog behavior. Modal dialogs clicks behind blocked an…
iTerminate Nov 25, 2026
f3d9c2b
In PF16 nested remote commands are ignored. Resolve by moving it around.
iTerminate Nov 25, 2026
aad5174
Handle null exception when bind is undefined
iTerminate Nov 25, 2026
2b9c3aa
Define user setting object
iTerminate Nov 25, 2026
2a22da3
Increase timeout for higher test reliability.
iTerminate Nov 25, 2026
12fac3b
Bug fixes allow changes to functioanlity if justified.
iTerminate Nov 25, 2026
0f876ac
Verify that the import results are successful.
iTerminate Nov 25, 2026
76f1652
Improve handling of changes to item metadata fields and processing them.
iTerminate Nov 25, 2026
63f47e8
remove 300 ms delay for processing.
iTerminate Nov 25, 2026
1ab1c2f
Restore 30 second timeout ceiling
iTerminate Nov 25, 2026
a91b101
For select return "" instead of null. Removes warnings.
iTerminate Nov 25, 2026
890778b
Siwtch to debug
iTerminate Nov 25, 2026
f76ca00
No exif data is acceptable
iTerminate Nov 25, 2026
aa15c48
Siwtch to debug
iTerminate Nov 25, 2026
69d5dc5
Nothing to load or save for user role
iTerminate Nov 25, 2026
33cd405
Show paginator only if items exist
iTerminate Nov 25, 2026
ac6d16b
Use multipart form for all the forms where file upload exists. Resolv…
iTerminate Nov 25, 2026
bd7c092
Updat release notes
iTerminate Nov 25, 2026
9484478
Resolve SLF warnings when generating API.
iTerminate Nov 25, 2026
9551bd5
Add flash storage imporvement
iTerminate Nov 25, 2026
c1137e4
Improved logging of failures
iTerminate Nov 25, 2026
c5e3340
Update release notes
iTerminate Nov 25, 2026
c66b820
Add tests for xls export of a list. Add test of document upload.
iTerminate Nov 25, 2026
b687e0d
Add markdown property test
iTerminate Nov 25, 2026
2f301f2
Update documentation with updated test coverage
iTerminate Nov 25, 2026
af13a44
Resolve github runner
iTerminate Nov 25, 2026
5424754
also include lib changes to trigger test
iTerminate Nov 25, 2026
62899df
Modernize loading dialog and clean up ajax-loader gif image.
iTerminate Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 45 additions & 0 deletions .github/workflows/cdb-base-mqtt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CDB Base MQTT

on:
push:
paths:
- "tools/developer_tools/cdb-base-mqtt/**"
- ".github/workflows/cdb-base-mqtt.yml"
pull_request:
paths:
- "tools/developer_tools/cdb-base-mqtt/**"
- ".github/workflows/cdb-base-mqtt.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tools/developer_tools/cdb-base-mqtt

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Java 8 and Maven cache
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "8"
cache: maven
cache-dependency-path: tools/developer_tools/cdb-base-mqtt/pom.xml

- name: Run tests
run: mvn --batch-mode --no-transfer-progress verify

- name: Publish test results
if: always()
uses: actions/upload-artifact@v4
with:
name: cdb-base-mqtt-test-results
path: tools/developer_tools/cdb-base-mqtt/target/surefire-reports/
if-no-files-found: warn
51 changes: 51 additions & 0 deletions .github/workflows/cdb-bely-message-broker-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CDB/BELY MQTT Message Broker Base

on:
push:
paths:
- "tools/developer_tools/cdb-bely-message-broker-base/**"
- ".github/workflows/cdb-bely-message-broker-base.yml"
pull_request:
paths:
- "tools/developer_tools/cdb-bely-message-broker-base/**"
- ".github/workflows/cdb-bely-message-broker-base.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Run message broker base tests
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/developer_tools/cdb-bely-message-broker-base

strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
make install-dev

- name: Lint
run: make lint

- name: Type check
run: make type-check

- name: Run tests with coverage
run: make test-cov
57 changes: 57 additions & 0 deletions .github/workflows/cdb-mqtt-message-broker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CDB MQTT Message Broker

on:
push:
paths:
- "tools/developer_tools/cdb-mqtt-message-broker/**"
- "tools/developer_tools/cdb-bely-message-broker-base/**"
- "src/java/CdbWebPortal/src/java/gov/anl/aps/cdb/mqtt/CdbMqttTopic.java"
- "src/java/CdbWebPortal/src/java/gov/anl/aps/cdb/mqtt/CdbMqttOperation.java"
- ".github/workflows/cdb-mqtt-message-broker.yml"
pull_request:
paths:
- "tools/developer_tools/cdb-mqtt-message-broker/**"
- "tools/developer_tools/cdb-bely-message-broker-base/**"
- "src/java/CdbWebPortal/src/java/gov/anl/aps/cdb/mqtt/CdbMqttTopic.java"
- "src/java/CdbWebPortal/src/java/gov/anl/aps/cdb/mqtt/CdbMqttOperation.java"
- ".github/workflows/cdb-mqtt-message-broker.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Run CDB MQTT message broker tests
runs-on: ubuntu-latest

defaults:
run:
working-directory: tools/developer_tools/cdb-mqtt-message-broker

strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies (base from this checkout)
run: |
python -m pip install --upgrade pip
make install-dev

- name: Lint
run: make lint

- name: Type check
run: make type-check

- name: Run tests with coverage
run: make test-cov
5 changes: 3 additions & 2 deletions .github/workflows/test-cdbportal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- 'src/java/CdbWebPortal/src/java/**'
- 'src/java/CdbWebPortal/lib/**'
- 'tools/developer_tools/code_testing/CdbWebPortalTest/**'
- '.github/workflows/test-cdbportal.yml'
workflow_dispatch:
Expand All @@ -24,11 +25,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 11 and Maven cache
- name: Set up JDK 25 and Maven cache
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
java-version: '25'
cache: maven
cache-dependency-path: tools/developer_tools/code_testing/CdbWebPortalTest/pom.xml

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tools/developer_tools/portal_testing/CdbFunctionalTester/nbproject/private/
/tools/developer_tools/code_testing/CdbWebPortalTest/target/
/tools/developer_tools/portal_testing/PythonSeleniumTest/support_bin/
/tools/developer_tools/portal_testing/PythonSeleniumTest/dw-data/
/tools/developer_tools/portal_testing/PythonSeleniumTest/test-failures/
/tools/developer_tools/python-client/*
/tools/developer_tools/python-client/**/.DS_Store
!/tools/developer_tools/python-client/generatePyClient.sh
Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ MariaDB 10.5. Authoritative schema is the set of `create_cdb_tables.sql`, `creat
- **Generated files that look like sources** are common: `cdb.portal.properties`, `web/WEB-INF/glassfish-web.xml`, `web/WEB-INF/web.xml`, `setup/glassfish-resources.xml`, `nbproject/private/private.properties`, and everything under `tools/developer_tools/python-client/packages/api/cdbApi/`. They are produced from `*.template` files (or via openapi-generator) by `dev-config` / `configure-web-portal` / `dist` targets and are in `.gitignore`. Edit the template, regenerate, then commit only the template.
- **`cdb` vs `cdb_dev`**: every db, deploy, undeploy, and backup target has a `-dev` variant that targets a separate database name and Payara domain, so a developer can run both side-by-side. When adding new admin scripts, follow the same pattern (first arg is DB name, defaulting to `cdb`).
- **Single canonical version string**: run `make prepare-release` (`sbin/cdb_prepare_release.py`) to bump `etc/version`, `openapi.yaml`, the web `?v=` cache-busters, the python-client `packages/*/pyproject.toml`/conda recipes, and scaffold `docs/release-notes/<VERSION>.md` together. It also flags any file that drifted out of sync in a prior manual release, and refreshes `uv.lock`.
- **Release notes as a plan milestone**: when planning a feature, include updating `docs/release-notes/<VERSION>.md` as the final milestone. Use the in-progress version (unreleased versions may already have notes; `etc/version` lags until `make prepare-release`), and create the file if it doesn't exist. Match the style of existing notes: `#` headings per area (e.g. `# MQTT`, `# API`, `# Testing`, `# Bug Fixes`), concise user-facing `*` bullets with nested sub-bullets for detail, and no commit hashes or file lists. Only list fixes to previously released behavior under Bug Fixes.
- **Ask before a bug fix changes behavior**: when a fix (including upgrade/regression fixes) would change user-visible behavior instead of restoring the previous behavior, describe the options (restore old vs. new behavior, with tradeoffs) and ask the user which one they want before implementing. Record the choice in the plan and, if user-facing, in the release notes.
- **Plugins** under `tools/developer_tools/cdb_plugins/plugins/<name>/` extend both the Java portal (deployed via `make deploy-cdb-plugin` → `update_plugin_generated_files.py`) and the Python web service. `pluginTemplates/` is the scaffold.
- **REST changes touch three places**: the Java route, `openapi.yaml`, and (after `generatePyClient.sh`) the regenerated `cdbApi/` package. The Python API tests under `tools/developer_tools/python-client/test/` are the integration check.

Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ TOP = .
SUBDIRS = src

.PHONY: support support-mysql dev-config prepare-release release-python-client
.PHONY: mqtt-configuration configure-mqtt mqtt-configuration-dev configure-mqtt-dev
.PHONY: db backup db-dev deploy-web-portal undeploy-web-portal deploy-web-service undeploy-web-service
.PHONY: db-dev backup-dev deploy-web-portal-dev undeploy-web-portal-dev deploy-web-service-dev undeploy-web-service-dev

Expand All @@ -28,6 +29,12 @@ release-python-client:
configuration:
$(TOP)/sbin/cdb_create_configuration.sh

mqtt-configuration:
$(TOP)/sbin/cdb_create_mqtt_configuration.sh cdb

configure-mqtt:
$(TOP)/sbin/cdb_configure_mqtt_service.sh cdb

support:
$(TOP)/sbin/cdb_install_support.sh

Expand Down Expand Up @@ -79,6 +86,12 @@ undeploy-web-service:
configuration-dev:
$(TOP)/sbin/cdb_create_configuration.sh cdb_dev

mqtt-configuration-dev:
$(TOP)/sbin/cdb_create_mqtt_configuration.sh cdb_dev

configure-mqtt-dev:
$(TOP)/sbin/cdb_configure_mqtt_service.sh cdb_dev

db-dev:
$(TOP)/sbin/cdb_create_db.sh cdb_dev

Expand Down
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ apt-get install wget gcc git make cmake build-essential libcurses-ocaml-dev curl

***Versions used in production***
- mariadb: 10.5.22
- Other dependencies are automatically downloaded and installed when running `make support` command.
- Payara 7 (Jakarta EE 11) and Java 25 LTS (Eclipse Temurin) on Linux x86_64; macOS (Intel and Apple Silicon) is supported for development.
- Other dependencies are automatically downloaded and installed when running `make support` command. Their versions are set in `support/bin/versions.sh` and can be overridden from the environment, e.g. `PAYARA_VERSION=... make support`.


# Deployment
Expand Down Expand Up @@ -63,7 +64,7 @@ Managing Payara:
# Navigate to the ComponentDB distribution directory.

# Viewing logs
tail -f ../support-`hostname -a`/payara/linux-x86_64/glassfish/domains/production/logs/server.log
tail -f ../support-`hostname -s`/payara/$CDB_HOST_ARCH/glassfish/domains/production/logs/server.log

# Restart payara server
./etc/init.d/cdb-glassfish restart
Expand All @@ -90,7 +91,13 @@ Restart application to reset any caches for `item_project`.

# Deployment Upgrade
See [docs/update/README.md](docs/update/README.md) for the full procedure, including
how to skip multiple releases at once. Summary, upgrading to 3.18.0:
how to skip multiple releases at once.

> **Upgrading from 3.19.x or earlier to 3.20.0 or later:** the platform moved to Payara 7 and Java 25.
> Rebuild the support software first and reconfigure the new Payara domain; see
> [Rebuilding Support Software](docs/update/README.md#rebuilding-support-software-rarely-needed).

Summary, upgrading to 3.18.0:
```sh
cd $CDB_INSTALL_DIR
wget https://github.com/AdvancedPhotonSource/ComponentDB/archive/v3.18.0.tar.gz
Expand Down Expand Up @@ -159,6 +166,8 @@ netbeans &
```

## Preparing Netbeans
`make support-netbeans` installs NetBeans 32 and configures it to run on the support JDK (Java 25), which the project needs to compile (`--release 25`). If you use another NetBeans install, start it with `--jdkhome $desired_dev_directory/support-`hostname -s`/java/$CDB_HOST_ARCH` or set `netbeans_jdkhome` in its `etc/netbeans.conf`. Don't select a separate Java Platform in the project properties; that would break `make` builds.

Once netbeans is open a few steps need to be taken to prepare netbeans for CDB development.
1. Open CDB Project: File > Open Project
2. Navigate to $desired_dev_directory/ComponentDB/src/java
Expand All @@ -167,16 +176,38 @@ Once netbeans is open a few steps need to be taken to prepare netbeans for CDB d
5. Click "Resolve Missing Server Problem"
6. Add Server -> Payara Server
- Installation Location: $desired_dev_directory/support-`hostname`/netbeans/payara
- Version: 5.2022.5
- Version: the Payara version in `support/bin/versions.sh` (currently 7.2026.11)
- Use the wizard's download
- Java Platform: the default (support JDK 25)
7. Next -> Use Default Domain Location -> Finish add server instance wizard
8. Select the Newly added "Payara Server"
9. Copy over the required mysql client to new payara server.
```sh
# cd into the $desired_dev_directory/$distribution_directory
cp src/java/CdbWebPortal/lib/mariadb-java-client-3.1.0.jar ../support-`hostname`/netbeans/payara/glassfish/domains/domain1/lib/
```
10. Run the project
10. Increase the server heap. The NetBeans-installed domain defaults to `-Xmx512m`, which runs out of memory (`OutOfMemoryError: Java heap space`) under the parallel Selenium suite and after repeated redeploys. With the server running:
```sh
ASADMIN=../support-`hostname`/netbeans/payara/bin/asadmin
$ASADMIN list-jvm-options | grep Xm # remove every existing -Xmx/-Xms value shown
$ASADMIN delete-jvm-options -- -Xmx512m
$ASADMIN create-jvm-options -- -Xmx4g
$ASADMIN create-jvm-options -- -Xms1g
$ASADMIN list-jvm-options | grep Xm # should show only -Xmx4g and -Xms1g
$ASADMIN restart-domain
```
11. Run the project

> Repeated NetBeans redeploys leak memory (old application class loaders are not fully released). Restart Payara before running the test suite or when the server slows down.

> **Optional (macOS):** Payara's Hazelcast data grid defaults to port 5900, which is also used by macOS Screen Sharing (VNC). If startup hangs and `server.log` repeats `Unknown protocol: RFB`, move Hazelcast to another port. The `make support` domain already uses 6900; the NetBeans-installed copy needs this once. Stop the server first (a running server keeps the old value and can write it back), then use the domain path shown in NetBeans under Services → Servers → Payara → Properties:
> ```sh
> DOMAIN_XML=../support-`hostname`/netbeans/payara/glassfish/domains/domain1/config/domain.xml
> # Sets or adds start-port; the element may have no attributes when Payara relies on the 5900 default.
> sed -i '' -E 's#<hazelcast-runtime-configuration( start-port="[0-9]+")?#<hazelcast-runtime-configuration start-port="6900"#' $DOMAIN_XML # GNU sed on Linux: sed -i -E ...
> grep hazelcast-runtime-configuration $DOMAIN_XML # should show start-port="6900"
> ```
> If the server is running, `asadmin set-hazelcast-configuration --enabled=true --startport 6900` followed by a restart does the same.

## ~~Python Web Service Development~~
The python web service is deprecated but is still a part of the distribution for legacy integrations.
Expand All @@ -194,6 +225,8 @@ source setup.sh
make test
```

The Selenium suite runs several browsers in parallel against the portal; give Payara at least a 4 GB heap (see step 10 of Preparing Netbeans) and restart it after a long redeploy session. Failure logs, screenshots, and page source are written to `tools/developer_tools/portal_testing/PythonSeleniumTest/test-failures/` (see `tools/developer_tools/portal_testing/PythonSeleniumTest/README.md`).

See the test setup in `tools/developer_tools/{python-client,portal_testing/PythonSeleniumTest}/README.md`.

## Preparing a Release
Expand Down
4 changes: 3 additions & 1 deletion db/sql/test/populate_allowed_property_domain.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
LOCK TABLES `allowed_property_domain` WRITE;
/*!40000 ALTER TABLE `allowed_property_domain` DISABLE KEYS */;
INSERT INTO `allowed_property_domain` VALUES
(2,2),
(9,7),
(10,8),
(11,8),
Expand All @@ -12,6 +13,7 @@ INSERT INTO `allowed_property_domain` VALUES
(13,6),
(13,7),
(13,8),
(13,9);
(13,9),
(16,2);
/*!40000 ALTER TABLE `allowed_property_domain` ENABLE KEYS */;
UNLOCK TABLES;
3 changes: 2 additions & 1 deletion db/sql/test/populate_property_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ INSERT INTO `property_type` VALUES
(12,'cable_design_internal_property_type','Cable Design Metadata',NULL,NULL,NULL,NULL,NULL,0,0,1,1,NULL),
(13,'Test Property','','',1,NULL,'','',0,0,0,1,NULL),
(14,'Control Interface','Describes the interface to parent in the control hierarchy.',NULL,NULL,NULL,NULL,NULL,0,0,1,1,1),
(15,'cable_end_designation_property_type','cable end designation',NULL,NULL,NULL,NULL,NULL,0,0,1,1,NULL);
(15,'cable_end_designation_property_type','cable end designation',NULL,NULL,NULL,NULL,NULL,0,0,1,1,NULL),
(16,'Markdown Document','Markdown documentation.',NULL,1,9,'','',0,0,0,1,1);
/*!40000 ALTER TABLE `property_type` ENABLE KEYS */;
UNLOCK TABLES;
Loading
Loading