-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
134 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.12.0-dev | ||
0.13.0-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Release v0.12.0 | ||
|
||
- Extend version regexp to support semver (#834) | ||
- fix broken links (#837) | ||
- fix duplicate command argument for plugin command execution (#831) | ||
- fix plugin error propagation (#830) | ||
- rework source info access for plugin clients (#829) | ||
- Bump github.com/hashicorp/go-retryablehttp from 0.7.6 to 0.7.7 in the go\_modules group (#827) | ||
- Support for CLI Extensions by OCM Plugins (#815) | ||
- Bump github.com/docker/docker from 26.1.4+incompatible to 27.0.0+incompatible (#817) | ||
- cleanup unused (#828) | ||
- close() writer, before trying to rename (#824) | ||
- enhance the auto update of the flake vendor hash (#826) | ||
- Bump the go group with 7 updates (#825) | ||
- Update README.md (#822) | ||
- fix https://github.com/open-component-model/ocm-project/issues/196 (#819) | ||
- Bump the go group with 8 updates (#816) | ||
- Fix make cmds (#810) | ||
- Adjust action (#813) | ||
- adjust github action definition (#811) | ||
- restruct blobaccess (#804) | ||
- auto update \`flake.nix\` vendor hash incl. singed commit (#809) | ||
- Simplify Pull Request Template (#808) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package grammar | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestConfig(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "OCM grammar Test Suite") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
Copyright The containerd Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package errors | ||
|
||
import ( | ||
"fmt" | ||
"io" | ||
"net/http" | ||
) | ||
|
||
var _ error = ErrUnexpectedStatus{} | ||
|
||
// ErrUnexpectedStatus is returned if a registry API request returned with unexpected HTTP status | ||
type ErrUnexpectedStatus struct { | ||
Status string | ||
StatusCode int | ||
Body []byte | ||
RequestURL, RequestMethod string | ||
} | ||
|
||
func (e ErrUnexpectedStatus) Error() string { | ||
if len(e.Body) > 0 { | ||
return fmt.Sprintf("unexpected status from %s request to %s: %s: %s", e.RequestMethod, e.RequestURL, e.Status, string(e.Body)) | ||
} | ||
return fmt.Sprintf("unexpected status from %s request to %s: %s", e.RequestMethod, e.RequestURL, e.Status) | ||
} | ||
|
||
// NewUnexpectedStatusErr creates an ErrUnexpectedStatus from HTTP response | ||
func NewUnexpectedStatusErr(resp *http.Response) error { | ||
var b []byte | ||
if resp.Body != nil { | ||
b, _ = io.ReadAll(io.LimitReader(resp.Body, 64000)) // 64KB | ||
} | ||
err := ErrUnexpectedStatus{ | ||
Body: b, | ||
Status: resp.Status, | ||
StatusCode: resp.StatusCode, | ||
RequestMethod: resp.Request.Method, | ||
} | ||
if resp.Request.URL != nil { | ||
err.RequestURL = resp.Request.URL.String() | ||
} | ||
return err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters