Repository navigation
Add compiled sources for the 1.2 Wiki samples - #2094
Merged
Merged
Conversation
|
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Exercise complete tutorials and guide fragments against local OPC UA services, including version-isolated migration examples and original example bodies. Keep smoke, capture, and inventory tools with the source so documentation behavior can be checked without changing runtime APIs.
Exercise failure handling, sampling batches, history ownership, serialization limits, and version-isolated JSON and certificate migration. Correct example guidance for GDS trust installation and Wireshark decoding. Validation: full formatting and clean compilation; 163 reactor tests; six migration tests per version and four additional 1.1.7 revocation cases with --add-opens; 16 original example entry points.
Exercise primitive-array decoding, JSON mode mismatches, and Binary/XML ExtensionObject migration through separate 1.1.7 and 1.2 JVMs. Verify that batched sampling reports an omitted device value as Bad_NoData. These fixtures support the Wiki compatibility and ownership guidance. No runtime API behavior changes.
Signed-off-by: Kevin Herron <kevinherron@gmail.com>
Signed-off-by: Kevin Herron <kevinherron@gmail.com>
Signed-off-by: Kevin Herron <kevinherron@gmail.com>
Keep contributor architecture, model generation, ownership boundaries, and test guidance with the source while directing callers to the complete 1.2 Wiki. Preserve existing feature-guide anchors and correct the tutorial test references, access-controller coverage, and JSON null test comment. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
Rewrite the displayed helpers so each step reads on its own line: braces on every if, named intermediate values instead of nested calls, and no result-count checks for single-operation requests. The history example shares one request helper between page reads and the release. Move the test-only release counter from the displayed service override into the history namespace so the Wiki fragment no longer carries it. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
A zero page budget made readRawHistory return an empty list without reading, which a caller could not tell apart from an empty interval. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
Replace the behavioral Wiki tests with compile-only snippet classes in milo-wiki-examples. Each Wiki sample sits between snippet markers, so an API change that breaks a sample fails the build, and sync_snippets.py copies the samples into a Wiki clone or reports stale blocks. Keep FirstClient, FirstServer, and one test that runs them together. Remove the integration-test fixtures, the two standalone migration projects, the consumer project, and the smoke, capture, and inventory tools. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
The restructured Wiki carries one running example through the client and server guides. FirstServer now publishes a Thermostat Object with a read-only Temperature, a writable Setpoint, and an AdjustSetpoint Method, and its snippet regions back the server pages. Client samples use those nodes and read like application code: a connect helper returns a connected client, a subscription keeps running until the caller deletes it, and Reverse Connect and GDS samples split into the parts each application runs. FirstProgramsTest now checks the thermostat behaviors the Wiki documents. The GDS install sample keeps the issuer chain the GDS returns. sync_snippets.py strips region markers from whole-file listings, rejects marker paths outside the source directory, and fails when the Wiki directory has no pages. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
AdjustSetpoint now reads, checks, and stores Setpoint while holding the node's lock, which a client write also holds when it stores a value, so concurrent changes cannot be lost. The GDS install sample accepts a chain that ends at the trusted CA itself, and writeBatch rejects a NodeId that appears twice because it reports failures by NodeId. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
The package Javadoc now describes what the packages contain. The README keeps the editing and sync instructions. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
Add a Documentation section that links the Wiki's getting-started path, the client and server guides, and the 1.2.0 migration guide. Link the feature guides to their Wiki pages, and use the current Sonatype snapshot repository. Signed-off-by: Kevin Herron <kevinherron@gmail.com>
Signed-off-by: Kevin Herron <kevinherron@gmail.com>
kevinherron
force-pushed
the
docs/wiki-1.2-validation
branch
from
October 12, 2026 18:47
de1bf7e to
8da5cc2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 1.2 user guide now lives on the GitHub Wiki. Its Java samples need a home where the build compiles them, so that an API change which breaks a sample fails here instead of leaving broken code in the Wiki. This PR adds that home and moves the user-facing parts of the source feature guides to the Wiki.
Wiki samples
milo-examples/wiki-examplesis a new module. Like the other examples, it is not deployed.FirstServerandFirstClientare the complete programs from the first-server and first-client tutorials.FirstServerpublishes a small thermostat, a Thermostat Object with a read-only Temperature, a writable Setpoint, and an AdjustSetpoint Method. The client and server guides use it as their running example, and the server pages show regions ofFirstServer.FirstProgramsTestchecks the thermostat behaviors the Wiki states: reads, writes and their failure statuses, browsing, and AdjustSetpoint results.snippetspackage holds every other Wiki sample that compiles against 1.2. Each sample sits between// snippet:NAME:startand// snippet:NAME:endcomments, and wrapper methods supply the variables a fragment uses without declaring. Nothing calls these classes. The build only compiles them.tools/sync_snippets.pycopies the samples into a local Wiki clone. Each backed Wiki code block names its source in a comment directly above it, and--checklists stale blocks without editing anything. Whole-file listings omit the region marker comments.The three "before" samples in the 1.2.0 migration guide use 1.1.7 APIs, so they are not compiled.
An earlier revision of this PR carried behavioral integration tests for every Wiki sample, two standalone migration projects, and smoke, capture, and inventory tools, about 7,700 lines in all. They served a one-time validation of the new Wiki. Keeping them would have meant maintaining documentation-shaped tests in the product repository, and they still did not check that the Wiki showed the tested code. This revision replaces them with the compile-only snippets and the sync check.
Source documentation
docs/featuresnow point callers to the Wiki. They keep the contributor material: architecture, model regeneration, ownership boundaries, and test guidance. All 94 of their original heading anchors still resolve.WiresharkKeyLogWriterandKeyLogExamplereplace the Wireshark menu path with the TShark preferences that decrypt traffic,opcua.debug_fileandopcua.tcp.port.GdsPullExampleclass documentation now says the pulled trust list is applied to the client's file-based certificate group.accesspackage documentation lists which services consult theAccessController, and which do not: HistoryRead, HistoryUpdate, AddNodes, TranslateBrowsePathsToNodeIds, and BrowseNext.None of this changes runtime behavior.
Verification
mvn clean verify -DskipTestspasses, so all main and test sources compile and the formatting check passes.FirstProgramsTestpasses withmvn -pl milo-examples/wiki-examples -am clean test -Dtest=FirstProgramsTest.sync_snippets.py --checkagainst the published Wiki reports no stale blocks among its 83 marked blocks.The first three commits on this branch lack
Signed-off-bytrailers. The ECA check passes, and later commits are signed off.