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

Update If-check to support CI/CD #872

Merged
merged 8 commits into from
Jul 2, 2024
Merged

Update If-check to support CI/CD #872

merged 8 commits into from
Jul 2, 2024

Conversation

manushak
Copy link
Contributor

@manushak manushak commented Jul 2, 2024

Types of changes

  • Enhancement (project structure, spelling, grammar, formatting)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

A description of the changes proposed in the Pull Request

  • Add error summary log when checking directory files
  • add process.exit(1) at the end of the catch

@manushak manushak self-assigned this Jul 2, 2024
@manushak manushak linked an issue Jul 2, 2024 that may be closed by this pull request
2 tasks
Copy link
Contributor

@jmcook1186 jmcook1186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm!

@narekhovhannisyan
Copy link
Member

@manushak @jmcook1186 it works but we have a bug and there is suggestion for improvement.

Right now we are getting the following:

Checking...

copy.yaml
if-check could not verify copy.yaml. The re-executed file does not match the original.

Files do not match!
tree.children.child-1.outputs.0.mock
source: exists
target: missing

generics.yaml
if-check successfully verified generics.yaml

instance-metadata.yaml
if-check successfully verified instance-metadata.yaml
copy.yaml
Files do not match!


Summary of all failing files:
2 of 3 files are passed.

tree.children.child-1.outputs.0.mock
source: exists
target: missing

Which means after summary we are getting logs

@narekhovhannisyan
Copy link
Member

As an improvement to UI we can modify messages like this:

Checking...

Executing `copy.yaml`
✖ if-check could not verify copy.yaml. The re-executed file does not match the original.
Files do not match!
tree.children.child-1.outputs.0.mock
source: exists
target: missing

Executing `generics.yaml`
✔ if-check successfully verified `generics.yaml`

Executing `instance-metadata.yaml`
✔ if-check successfully verified `instance-metadata.yaml`

Executing `copy.yaml`
✖ Files do not match!
tree.children.child-1.outputs.0.mock
source: exists
target: missing

Tests summary:
2 of 3 files are passed.

Copy link
Member

@narekhovhannisyan narekhovhannisyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check comments above

@jmcook1186
Copy link
Contributor

ok I like the proposed updates but also liked that @manushak 's version separated out the individual emitted logs from the summary of failures. think we need some kind of break between the emitted messages and the "summary" - even if it is just a line break and summary title, e.g.

Checking...

Executing `copy.yaml`
✖ if-check could not verify copy.yaml. The re-executed file does not match the original.
Files do not match!
tree.children.child-1.outputs.0.mock
source: exists
target: missing

Executing `generics.yaml`
✔ if-check successfully verified `generics.yaml`

Executing `instance-metadata.yaml`
✔ if-check successfully verified `instance-metadata.yaml`

---
if-check verification failures:
---

Executing `copy.yaml`
✖ Files do not match!
tree.children.child-1.outputs.0.mock
source: exists
target: missing

---
Tests summary:
2 of 3 files are passed.

@narekhovhannisyan
Copy link
Member

narekhovhannisyan commented Jul 2, 2024

@jmcook1186 it doesn't look like an intentional solution since the title is before the summary and the rest is after. Yeah the end solution looks good

@narekhovhannisyan narekhovhannisyan merged commit 9991d09 into main Jul 2, 2024
2 checks passed
@narekhovhannisyan narekhovhannisyan deleted the if-check-error branch July 2, 2024 15:56
@github-actions github-actions bot mentioned this pull request Jul 4, 2024
This was referenced Aug 8, 2024
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.

Update if-check to support CI/CD
3 participants