Skip to content

fix cache check for empty folder #631

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

liangyuanpeng
Copy link
Contributor

@liangyuanpeng liangyuanpeng commented May 3, 2025

Once the first download of the module fails and the directory of the package is successfully created, "package not found" will always be prompted and no retry will be made.

It can be easily reproduced: Press Ctrl+C to cancel the download before kcl run the module download is completed, and then try kcl run again.

PS D:\repo\git\workspace\cncf\star\kcl\k8sdemo> kcl run
downloading 'kcl-lang/k8s:1.28.1' from 'ghcr.io/kcl-lang/k8s:1.28.1'
failed to get package with '1.28.1' from 'ghcr.io/kcl-lang/k8s'
Get "https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:4c4f5b1c8d335f1b52a0ea49e7287415230d580c6f70eb9ef45124e8114a8b3d?se=2025-04-28T03%3A45%3A00Z&sig=9WreF9fIXz7CGCieE7gIcwYg68ZYtKeyavfFuXUaeOU%3D&sp=r&spr=https&sr=b&sv=2019-12-12": dial 
tcp: lookup pkg-containers.githubusercontent.com: no such host

PS D:\repo\git\workspace\cncf\star\kcl\k8sdemo> kcl run
package 'k8s:1.28.1' not found

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

  • N
  • Y

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: liangyuanpeng <gcslyp@gmail.com>
@liangyuanpeng liangyuanpeng marked this pull request as draft May 8, 2025 02:28
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.

Enhancement: kpm add command displaying optimization
1 participant