[jira] [Comment Edited] (SLING-7927) JSON Content Loading errors out import on malformed json

2019-08-07 Thread Eric Norman (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-7927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16902340#comment-16902340
 ] 

Eric Norman edited comment on SLING-7927 at 8/7/19 5:42 PM:


[~jebailey] In your proposal, may I ask who would make the decision on how to 
handle errors?  In other words, how it would be pre-determined whether to call 
`load(content)` versus a 'loadQuietly(content)`?

Also, I am curious how these new skipped errors would impact the existing 
content loading 'retry' logic.  Would the quiet content loading errors trigger 
an attempt to re-try content loading later or would that bundle content loading 
be considered complete with no retries?

 

Alternatively, perhaps a better solution would be to create a new maven plugin 
to parse and validate that your JSON files are well formed?  This should catch 
malformed content problems earlier at build time so you wouldn't have to try to 
debug the troubles later in the runtime?  I'm imagining something similar to 
how the syntax of htl files are validated at build time by 
[https://sling.apache.org/components/htl-maven-plugin/]

 


was (Author: edn):
[~jebailey] In your proposal, may I ask who would make the decision on how to 
handle errors?  In other words, how it would be pre-determined whether do call 
`load(content)` versus a 'loadQuietly(content)`?

Also, I am curious how these new skipped errors would impact the existing 
content loading 'retry' logic.  Would the quiet content loading errors trigger 
an attempt to re-try content loading later or would that bundle content loading 
be considered complete with no retries?

 

Alternatively, perhaps a better solution would be to create a new maven plugin 
to parse and validate that your JSON files are well formed?  This should catch 
malformed content problems earlier at build time so you wouldn't have to try to 
debug the troubles later in the runtime?  I'm imagining something similar to 
how the syntax of htl files are validated at build time by 
[https://sling.apache.org/components/htl-maven-plugin/]

 

> JSON Content Loading errors out import on malformed json
> 
>
> Key: SLING-7927
> URL: https://issues.apache.org/jira/browse/SLING-7927
> Project: Sling
>  Issue Type: Bug
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: JCR ContentLoader 2.3.2
>
>
> Current Behaviour:
> During the importing of json content from a bundle. If one of the files 
> contains malformed json the load process is discontinued and exits. This 
> stops the loading of any other, correctly formatted, data.
>  
> Expected Behaviour:
> If a single file contains malformed content, that specific file should 
> discontinue, the error logged and then the process continues to import the 
> rest of the provided content.
> As it is right now, it's possible to load the bundle and have the application 
> in an unworkable state. preventing the ability to trouble shoot and 
> investigate the root cause.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Comment Edited] (SLING-7927) JSON Content Loading errors out import on malformed json

2019-08-07 Thread Eric Norman (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-7927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16902340#comment-16902340
 ] 

Eric Norman edited comment on SLING-7927 at 8/7/19 5:41 PM:


[~jebailey] In your proposal, may I ask who would make the decision on how to 
handle errors?  In other words, how it would be pre-determined whether do call 
`load(content)` versus a 'loadQuietly(content)`?

Also, I am curious how these new skipped errors would impact the existing 
content loading 'retry' logic.  Would the quiet content loading errors trigger 
an attempt to re-try content loading later or would that bundle content loading 
be considered complete with no retries?

 

Alternatively, perhaps a better solution would be to create a new maven plugin 
to parse and validate that your JSON files are well formed?  This should catch 
malformed content problems earlier at build time so you wouldn't have to try to 
debug the troubles later in the runtime?  I'm imagining something similar to 
how the syntax of htl files are validated at build time by 
[https://sling.apache.org/components/htl-maven-plugin/]

 


was (Author: edn):
[~jebailey] In your proposal, may I ask who would make the decision on how to 
handle errors?  In other words, how it would be pre-determined whether do call 
`load(content)` versus a 'loadQuietly(content)`?

Also, I am curious how these new skipped errors would impact the existing 
content loading 'retry' logic.  Would the quiet content loading errors trigger 
an attempt to re-try content loading later or would that bundle content loading 
be considered complete with no retries?

 

Alternatively, perhaps a better solution would be to create a new maven plugin 
to parse and validate that your JSON files are well formed?  This should catch 
malformed content problems earlier at build time so you wouldn't have to try to 
debug the troubles later in the runtime?  I'm imagining something similar to 
how htl files are validated at build time by 
[https://sling.apache.org/components/htl-maven-plugin/]

 

> JSON Content Loading errors out import on malformed json
> 
>
> Key: SLING-7927
> URL: https://issues.apache.org/jira/browse/SLING-7927
> Project: Sling
>  Issue Type: Bug
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: JCR ContentLoader 2.3.2
>
>
> Current Behaviour:
> During the importing of json content from a bundle. If one of the files 
> contains malformed json the load process is discontinued and exits. This 
> stops the loading of any other, correctly formatted, data.
>  
> Expected Behaviour:
> If a single file contains malformed content, that specific file should 
> discontinue, the error logged and then the process continues to import the 
> rest of the provided content.
> As it is right now, it's possible to load the bundle and have the application 
> in an unworkable state. preventing the ability to trouble shoot and 
> investigate the root cause.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Comment Edited] (SLING-7927) JSON Content Loading errors out import on malformed json

2019-08-06 Thread Eric Norman (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-7927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901344#comment-16901344
 ] 

Eric Norman edited comment on SLING-7927 at 8/6/19 6:06 PM:


[~jebailey] How would you anticipate dealing with dependencies between the JSON 
files?  If loading a JSON file fails for some reason, how can you be sure the 
other JSON files do not depend on something loaded by the one that failed?

For example, the failing file creates some users and then the other files try 
to assign permissions for those users?

In other words, failing fast (and stopping the loading attempt) may be the 
safer approach for certain scenarios and attempting to load the other files 
could potentially be harmful and obscure the root reason for subsequent 
failures.


was (Author: edn):
[~jebailey] How would you anticipate dealing with dependencies between the JSON 
files?  If loading a JSON file fails for some reason, how can you be sure the 
other JSON files do not depend on something loaded by the one that failed?

For example, the failing file creates some users and then the other files try 
to assign permissions for those users?

In other words, failing fast may be the safer approach for certain scenarios 
and attempting to load the other files could potentially be harmful and obscure 
the root reason for subsequent failures.

> JSON Content Loading errors out import on malformed json
> 
>
> Key: SLING-7927
> URL: https://issues.apache.org/jira/browse/SLING-7927
> Project: Sling
>  Issue Type: Bug
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: JCR ContentLoader 2.3.2
>
>
> Current Behaviour:
> During the importing of json content from a bundle. If one of the files 
> contains malformed json the load process is discontinued and exits. This 
> stops the loading of any other, correctly formatted, data.
>  
> Expected Behaviour:
> If a single file contains malformed content, that specific file should 
> discontinue, the error logged and then the process continues to import the 
> rest of the provided content.
> As it is right now, it's possible to load the bundle and have the application 
> in an unworkable state. preventing the ability to trouble shoot and 
> investigate the root cause.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Comment Edited] (SLING-7927) JSON Content Loading errors out import on malformed json

2019-07-24 Thread Radu Cotescu (JIRA)


[ 
https://issues.apache.org/jira/browse/SLING-7927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16891875#comment-16891875
 ] 

Radu Cotescu edited comment on SLING-7927 at 7/24/19 2:02 PM:
--

[~jebailey], isn't this issue about the JCR Content Loader and _not_ the Parser?


was (Author: radu.cotescu):
[~jebailey], isn't this issue about the JCR Content Loader?

> JSON Content Loading errors out import on malformed json
> 
>
> Key: SLING-7927
> URL: https://issues.apache.org/jira/browse/SLING-7927
> Project: Sling
>  Issue Type: Bug
>Reporter: Jason E Bailey
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: JCR Content Parser 1.2.8
>
>
> Current Behaviour:
> During the importing of json content from a bundle. If one of the files 
> contains malformed json the load process is discontinued and exits. This 
> stops the loading of any other, correctly formatted, data.
>  
> Expected Behaviour:
> If a single file contains malformed content, that specific file should 
> discontinue, the error logged and then the process continues to import the 
> rest of the provided content.
> As it is right now, it's possible to load the bundle and have the application 
> in an unworkable state. preventing the ability to trouble shoot and 
> investigate the root cause.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)