Skip to content

feat: support login with plainhttp#638

Merged
zong-zhe merged 3 commits into
kcl-lang:mainfrom
liangyuanpeng:feat_login_http
May 22, 2025
Merged

feat: support login with plainhttp#638
zong-zhe merged 3 commits into
kcl-lang:mainfrom
liangyuanpeng:feat_login_http

Conversation

@liangyuanpeng

@liangyuanpeng liangyuanpeng commented May 15, 2025

Copy link
Copy Markdown
Contributor

fixes #636

changes

  • change test registry port from 5001 to 5002, 5001 is the registry debug port by default, let we use the different port.
  • support login oci with plainHttp
  • add test for login oci with plainHttp

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: Lan Liang <gcslyp@gmail.com>
Signed-off-by: Lan Liang <gcslyp@gmail.com>
@coveralls

coveralls commented May 15, 2025

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 15045578640

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 42.099%

Totals Coverage Status
Change from base Build 14925490215: 0.04%
Covered Lines: 4183
Relevant Lines: 9936

💛 - Coveralls

@liangyuanpeng liangyuanpeng force-pushed the feat_login_http branch 2 times, most recently from e84ccbc to d4cf065 Compare May 15, 2025 12:41
change test registry port from 5001 to 5002

Signed-off-by: Lan <gcslyp@gmail.com>
Comment thread pkg/client/login_test.go
}
}()

os.Setenv("OCI_REG_PLAIN_HTTP", "ON")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if there is a better way

@liangyuanpeng

Copy link
Copy Markdown
Contributor Author

This PR requires the main review file:

pkg/client/login.go
pkg/client/login_test.go
scripts/push_pkg.sh
scripts/reg.sh

@liangyuanpeng

Copy link
Copy Markdown
Contributor Author

cc @zong-zhe @Peefy

@zong-zhe zong-zhe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work! 👍 LGTM!

@zong-zhe zong-zhe merged commit 97734d6 into kcl-lang:main May 22, 2025
@liangyuanpeng liangyuanpeng deleted the feat_login_http branch May 22, 2025 14:37
fhopfensperger pushed a commit to fhopfensperger/kcl-lang-kpm that referenced this pull request Jun 3, 2025
* feat: support login with plainhttp

Signed-off-by: Lan Liang <gcslyp@gmail.com>

* fix: update argo-cd-order to 0.2.1

Signed-off-by: Lan Liang <gcslyp@gmail.com>

* feat: add test for login with oci

change test registry port from 5001 to 5002

Signed-off-by: Lan <gcslyp@gmail.com>

---------

Signed-off-by: Lan Liang <gcslyp@gmail.com>
Signed-off-by: Lan <gcslyp@gmail.com>
fhopfensperger pushed a commit to fhopfensperger/kcl-lang-kpm that referenced this pull request Jun 3, 2025
* feat: support login with plainhttp

Signed-off-by: Lan Liang <gcslyp@gmail.com>

* fix: update argo-cd-order to 0.2.1

Signed-off-by: Lan Liang <gcslyp@gmail.com>

* feat: add test for login with oci

change test registry port from 5001 to 5002

Signed-off-by: Lan <gcslyp@gmail.com>

---------

Signed-off-by: Lan Liang <gcslyp@gmail.com>
Signed-off-by: Lan <gcslyp@gmail.com>
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.

func (c *KpmClient) LoginOci(hostname, username, password string) error Enhancement: kpm add command displaying optimization

3 participants