Repository navigation
fix(cli)!: stop using the default instance for a missing container - #75
Merged
Merged
Conversation
status no longer probes the default instance for a named container with no known endpoint, and env, services, snapshot and az setup exit 1 with the next step instead of acting on it. wait keeps looking for the container until --timeout, and doctor and version still run. A profile's port is used before its container starts, and an endpoint from --endpoint, FLOCI_ENDPOINT or another host beats a local container's published port. BREAKING CHANGE: in status -o json, endpoint is null when the selected container has no known endpoint. env, services, snapshot and az setup exit 1 in that case, where they used to use the default endpoint. An --endpoint or FLOCI_ENDPOINT on the default port is now honoured even when a local container publishes another port. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
[Medium impact] The PR appears safe to merge; the previous configured-port issue is fixed.
|
…tatus status reported endpoint null and exited 1 for a healthy server when FLOCI_ENDPOINT equalled the product default, because its check ignored the environment while the published port was skipped in favour of it. Addresses the review of #75. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
…endpoint Signed-off-by: Hector Ventura <hectorvent@gmail.com> # Conflicts: # README.md # plugin.json # src/main/java/io/floci/cli/commands/DoctorCommand.java # src/main/java/io/floci/cli/commands/EnvCommand.java # src/main/java/io/floci/cli/commands/az/AzEnvCommand.java # src/main/java/io/floci/cli/commands/gcp/GcpEnvCommand.java # src/main/java/io/floci/cli/commands/oci/OciEnvCommand.java
This branch changes the skill, and 1.0.3 shipped with #74. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
A profile with a non-default container and the product's default port yields the default endpoint, which read as no endpoint chosen, so env exited 1 and status reported null. The provider now records that the port came from the profile. A profile with neither a port nor an endpoint stays unknown. Addresses the review of #75. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
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.
Summary
For a named container that does not exist, the CLI fell back to the default endpoint, so
statusdescribed the default instance andenv,servicesandsnapshotcould point at or change it.statusno longer probes the default instance and reportsendpoint: null.env,services,az setupand thesnapshotcommands exit 1 with the next step.waitkeeps looking for the container until--timeoutand ignores a server on the default port.doctorandversionstill run and do not probe it.portis used before its container starts.--endpoint,FLOCI_ENDPOINTor another host beats a local container's published port.Breaking: scripts reading
endpointfromstatus -o jsonas a string must handle null. Commands that used the default endpoint here now exit 1. An--endpointorFLOCI_ENDPOINTon the default port is now honoured even when a local container publishes another port.Type of change
fix:)feat:)feat!:orfix!:)Product trees affected
commands/gcp/)commands/az/)Checklist
mvn testpasses locallyREADME.mdupdated (if a command or flag changed)mvn package -Pnative), required if Jackson serialization or dependencies changedfeat/fix/perfsubject becomes the release note, soCHANGELOG.mdneeds no hand editTests
MissingInstanceEndpointTestcovers each case above, parameterized over all four trees where the behaviour varies. 785 tests, 0 failures. Comparedmainand this branch with a fat JAR against real docker, including Docker unreachable and a live server on the default port. Native build and smoke pass on linux/amd64 and darwin/arm64 with this change merged alongside the other open work, but the smoke script does not run these endpoint paths. OCI is covered too: the template has no box for it.