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

fix: report in case of cyclic dependency #268

Merged

Conversation

AkashKumar7902
Copy link
Contributor

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

fix #267

2. What is the scope of this PR (e.g. component or file name):

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@coveralls
Copy link

coveralls commented Feb 18, 2024

Pull Request Test Coverage Report for Build 7975423704

Details

  • -9 of 35 (74.29%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 41.053%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/cmd/cmd_graph.go 0 1 0.0%
pkg/client/client.go 26 34 76.47%
Totals Coverage Status
Change from base Build 7969313170: 0.2%
Covered Lines: 1700
Relevant Lines: 4141

💛 - Coveralls

@Peefy Peefy requested a review from zong-zhe February 19, 2024 05:34
@@ -157,6 +157,10 @@ func TestDependencyGraph(t *testing.T) {
)
}

func TestCyclicDependency(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The test is empty and CI failed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i am working on that test. this test wasn't supposed to be pushed, got committed with other changes on client_test.go
sorry about that

Copy link
Contributor Author

@AkashKumar7902 AkashKumar7902 Feb 19, 2024

Choose a reason for hiding this comment

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

@Peefy I have added the unit test, i couldn't understand why "windows test" ci is failing.
image
any insights what went wrong ?

also e2e tests are failing as cycle exist and now an error is thrown.
image
I can fix the e2e test by changing test_suite.stdout files

Copy link
Contributor

Choose a reason for hiding this comment

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

e2e test still failed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

passed 👍

@AkashKumar7902 AkashKumar7902 force-pushed the report-when-dependency-graph-contains-cycle branch 5 times, most recently from 9292e22 to 0bb5900 Compare February 19, 2024 06:34
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@AkashKumar7902 AkashKumar7902 force-pushed the report-when-dependency-graph-contains-cycle branch from 0bb5900 to 8c49378 Compare February 19, 2024 06:35
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
pkg/client/client.go Outdated Show resolved Hide resolved
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@AkashKumar7902 AkashKumar7902 force-pushed the report-when-dependency-graph-contains-cycle branch 3 times, most recently from bf125fb to fbbf056 Compare February 20, 2024 14:49
Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@AkashKumar7902 AkashKumar7902 force-pushed the report-when-dependency-graph-contains-cycle branch from fbbf056 to d3eb344 Compare February 20, 2024 14:54
@Peefy Peefy merged commit 67a77a0 into kcl-lang:main Feb 20, 2024
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants