Skip to content

Enhance salesforce converter UX - #286

Open
MonkeyCanCode wants to merge 1 commit into
apache:mainfrom
MonkeyCanCode:enhance_salesforce_converter_ux
Open

Enhance salesforce converter UX#286
MonkeyCanCode wants to merge 1 commit into
apache:mainfrom
MonkeyCanCode:enhance_salesforce_converter_ux

Conversation

@MonkeyCanCode

Copy link
Copy Markdown
Contributor

Summary

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant