You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ossie.apache.org by "MonkeyCanCode (via GitHub)" <gi...@apache.org> on 2026/07/29 07:33:21 UTC
[PR] Enhance salesforce converter UX [ossie]
MonkeyCanCode opened a new pull request, #286:
URL: https://github.com/apache/ossie/pull/286
<!--
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.
-->
## Summary
<!-- Describe what this PR does and why. -->
## Related Issues
The current salesforce converter CLI only provide error codes (1-3) to end-user and not telling user what is wrong with the command. This PR addresses this gap by adding basic error message when exception got trigger.
Here is the current behavior:
```
# error code 1
➜ salesforce git:(main) ✗ java -jar target/ossie-salesforce-converter-0.1.0-SNAPSHOT.jar invalidDirection
➜ salesforce git:(main) ✗ echo $?
1
# error code 2
➜ salesforce git:(main) ✗ java -jar target/ossie-salesforce-converter-0.1.0-SNAPSHOT.jar toOSI nonexisted.json
➜ salesforce git:(main) ✗ echo $?
2
# error code 3 (hard to produce but matches to the pattern of error code 2)
```
Here is the new behavior:
```
# error code 1
➜ salesforce git:(enhance_salesforce_converter_ux) ✗ java -jar target/ossie-salesforce-converter-0.1.0-SNAPSHOT.jar invalidDirection
Usage: ossie-salesforce-converter <direction> <input-file>
direction: toSF | toOSI
➜ salesforce git:(enhance_salesforce_converter_ux) ✗ echo $?
1
# error code 2
➜ salesforce git:(enhance_salesforce_converter_ux) ✗ java -jar target/ossie-salesforce-converter-0.1.0-SNAPSHOT.jar toOSI nonexisted.json
Error: Input file not found: nonexisted.json
➜ salesforce git:(enhance_salesforce_converter_ux) ✗ echo $?
2
# error code 3 (hard to produce but matches to the pattern of error code 2)
```
This PR also fixes the broken ASCII arts for architecture diagram.
## Checklist
### Specification
- [ ] Spec changes are included in `core-spec/` and follow the existing structure
- [ ] Spec changes have been discussed on the mailing list or in a linked issue
- [ ] Breaking changes to the spec are clearly called out in the summary
### Ontology
- [ ] Ontology changes in `ontology/` are consistent with spec changes
- [ ] New or modified terms are defined and documented
### Converters
- [ ] Converter logic in `converters/` is updated to reflect spec or ontology changes
- [ ] New converters include tests under the converter's test directory
### Validation
- [ ] Validation rules in `validation/` are updated if the spec changed
- [ ] New validation cases are covered by tests
### Documentation
- [ ] `docs/` is updated to reflect any user-facing changes
- [ ] New features or behaviors are documented with examples where appropriate
- [ ] `CONTRIBUTING.md` is updated if the contribution process changed
### Examples
- [ ] `examples/` are added or updated for any new spec constructs or converter support
### Tests
- [ ] All existing tests pass (`pytest` / CI green)
- [ ] New functionality is covered by tests
### Compliance
- [ ] ASF license headers are present on all new source files
- [ ] No third-party dependencies are added without PMC/IPMC approval
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enhance salesforce converter UX [ossie]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #286:
URL: https://github.com/apache/ossie/pull/286#discussion_r3945162397
##########
converters/salesforce/src/main/java/org/apache/ossie/app/OssieSalesforceConverter.java:
##########
@@ -39,6 +39,8 @@ public class OssieSalesforceConverter {
public static void main(String[] args) {
if (args.length < 2) {
+ System.err.println("Usage: ossie-salesforce-converter <direction> <input-file>");
+ System.err.println(" direction: toSF | toOSI");
Review Comment:
The usage help advertises `toOSI`, but `parseDirection()` only accepts `toOssie` (case-insensitive). Following the printed usage will currently trigger an "Invalid direction" error; update the usage string to match the supported argument (or add `toOSI` as an accepted alias).
##########
converters/salesforce/README.md:
##########
@@ -232,14 +232,14 @@ dimensions.
## Architecture
```
- ┌───────────────────────┐
- │ OssieSalesforceConverter│
- │ (CLI App) │
- └───────────┬───────────┘
+ ┌──────────────────────────┐
+ │ OssieSalesforceConverter │
+ │ (CLI App) │
+ └───────────┬──────────────┘
│
- ┌───────┴────────┐
+ ┌───────┴─────────┐
Review Comment:
This diagram line has trailing whitespace at the end of the line, which can cause noisy diffs and markdown lint failures; remove the extra spaces.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enhance salesforce converter UX [ossie]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #286:
URL: https://github.com/apache/ossie/pull/286#discussion_r4114024562
##########
converters/salesforce/src/main/java/org/apache/ossie/app/OssieSalesforceConverter.java:
##########
@@ -50,8 +52,10 @@ public static void main(String[] args) {
ConversionDirection direction = parseDirection(directionArg);
app.convert(direction, inputPath);
} catch (InvalidInputException e) {
Review Comment:
Sorry for the late response @jbonofre . I had been busy for the last couple of months.
This is a great idea. This is now added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enhance salesforce converter UX [ossie]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre commented on code in PR #286:
URL: https://github.com/apache/ossie/pull/286#discussion_r4072469458
##########
converters/salesforce/src/main/java/org/apache/ossie/app/OssieSalesforceConverter.java:
##########
@@ -50,8 +52,10 @@ public static void main(String[] args) {
ConversionDirection direction = parseDirection(directionArg);
app.convert(direction, inputPath);
} catch (InvalidInputException e) {
Review Comment:
Since we are adding user-facing error messages: `SchemaValidation.validate()` (called via `ConverterImpl.convert`) throws `ValidationException`, a sibling `RuntimeException` not covered by either catch below.
A schema validation failure will skip this new messaging entirely and print raw stack trace with exit code 1 instead of a distinct documented code. =
I think it's worth adding a catch for it while we are touching this block.
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enhance salesforce converter UX [ossie]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre merged PR #286:
URL: https://github.com/apache/ossie/pull/286
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org