Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display error line #125

Closed
k2tzumi opened this issue Aug 30, 2022 · 13 comments
Closed

Display error line #125

k2tzumi opened this issue Aug 30, 2022 · 13 comments
Labels

Comments

@k2tzumi
Copy link
Collaborator

k2tzumi commented Aug 30, 2022

Proposal

It is difficult to identify errors when the scenario becomes large and multiple includes are made.
I want to be able to display the number of lines as well as the file that had the error.
I would like to display the desc defined in step as well.

We would like to display the number of lines in the normal error output if we can achieve the following
#121

@k2tzumi k2tzumi added the enhancement New feature or request label Aug 30, 2022
@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Sep 15, 2022

note
#146 (comment)

How to display an error if the Runbook is a standard input? We may need to consider this.

@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Sep 23, 2022

Mounting method study

  • When parsing yaml and structuring each sentence, keep the corresponding line number in the structure.
  • After the error occurs, re-analyze the original source from the characteristics of the section in question to identify the relevant line

Which implementation is more efficient? And can it be more accurate in identifying the relevant rows with less impact on future enhancements?

If you have any good ideas, we'd like to discuss them in more depth.

@k1LoW
Copy link
Owner

k1LoW commented Oct 1, 2022

If we are doing normal Unmarshal, it seems to be difficult to get the YAML rows.

Also, errors may not correspond to YAML lines.

Perhaps it would be better to split this problem into two parts.

  1. Linter to check runbook format ( e.g. runn lint )
    • Build completely separate from the current Unmarshal structure.
  2. Display more detailed reasons for errors that occur in steps
    • At least be able to see the runbook file and step key where the error is occurring.

@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Oct 1, 2022

First, implement linter so that the runn book structure can be analyzed.
At this point, it will be possible to determine which lines of the original yaml correspond to the syntax, including the steps.
After that, we will detail the errors

I thought the above process seemed like a good way to fine-tune the problem

@amoghrajesh
Copy link

@k2tzumi is this issue still open? I would like to work on it as part of Hacktoberfest 2022

@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Oct 4, 2022

Yes issues remain.
I have no concrete results, just a study of implementation methods on my part.

I would like to work on it as part of Hacktoberfest 2022

It would be helpful if you could proceed with the assignment.

@amoghrajesh
Copy link

@k2tzumi can you tell me how to start or point me to a getting started guide?

@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Oct 4, 2022

I don't know if this will be helpful, but I found the following page
https://dev.to/nitinkumar30/what-how-to-do-in-hacktoberfest-2022-p36

By the way, I have never attended Hacktoberfest.

I don't understand because the conversation was so abrupt, but what would be the purpose of your participation in this Hacktoberfest?

I feel it is an interesting initiative.

@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Oct 4, 2022

@amoghrajesh

I was researching Hacktoberfest and realized I was mistaken.
Sorry for the odd reply.

Is the purpose of the following OK?

  • register runn in the maintenance repository of Hacktoberfest

As far as I can confirm, you need to have the authority to own the repository, so you cannot make the decision on your own.

Please give us a few minutes to check with owner.
Contributions are always welcome, not just for Hacktoberfest participation, so please keep in touch!

@k1LoW
Copy link
Owner

k1LoW commented Oct 4, 2022

Hi @amoghrajesh !

Welcome!

can you tell me how to start or point me to a getting started guide?

Unfortunately, we are not able to provide a starting guide for this repository, as it is not fully developed.

You will need to read the code and find bugs and make suggestions, like #71.

Please refer to past merged Issues and PRs.

Or, I am not particularly good at English, so I would be very happy to get suggestions for better updates to the README.

Happy hacktoberfest 🐙

@k1LoW
Copy link
Owner

k1LoW commented Oct 4, 2022

is this issue still open?

YES! we want!!

@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Nov 10, 2023

% go run cmd/runn/main.go run testdata/book/runn_1_fail.yml
.

1) testdata/book/runn_1_fail.yml b6d90c331b04ab198ca95b13c5f656fd2522e53b
  Failure/Error: test failed on "Test for RunN (1)".steps[0]: condition is not true
  
  Condition:
    false
    │
    └── false => false
    
  Failure step (testdata/book/runn_1_fail.yml):
  3   -
  4     test: false


1 scenario, 0 skipped, 1 failure

Is it almost ready for implementation?
Would support for GithubAcrtions output format be better added in a separate Issue?

@k1LoW
Copy link
Owner

k1LoW commented Nov 10, 2023

Is it almost ready for implementation?

Indeed. I might say we've already implemented it.

Would support for GithubAcrtions output format be better added in a separate Issue?

This Issue may be more similar.

@k1LoW k1LoW closed this as completed Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants