Skip to content

Commit

Permalink
cog_push_id -> push_id
Browse files Browse the repository at this point in the history
Signed-off-by: Nikhil Sinha <[email protected]>
  • Loading branch information
NikhilSinha1 committed Feb 19, 2025
1 parent 12c69ee commit fa79bb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/web/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type Version struct {
OpenAPISchema map[string]any `json:"openapi_schema"`
RuntimeConfig RuntimeConfig `json:"runtime_config"`
Virtual bool `json:"virtual"`
CogPushID string `json:"cog_push_id"`
PushID string `json:"push_id"`
}

func NewClient(dockerCommand command.Command, client *http.Client) *Client {
Expand All @@ -80,9 +80,9 @@ func NewClient(dockerCommand command.Command, client *http.Client) *Client {
}
}

func (c *Client) PostPushStart(ctx context.Context, cogPushID string, buildTime time.Duration) error {
func (c *Client) PostPushStart(ctx context.Context, pushID string, buildTime time.Duration) error {
jsonBody := map[string]any{
"cog_push_id": cogPushID,
"push_id": pushID,
"build_duration": types.Duration(buildTime).String(),
"push_start_time": time.Now().UTC(),
}
Expand Down Expand Up @@ -258,7 +258,7 @@ func (c *Client) versionFromManifest(image string, weights []File, files []File)
}

if pushID, ok := manifest.Config.Labels["run.cog.push_id"]; ok {
version.CogPushID = pushID
version.PushID = pushID
}

return &version, nil
Expand Down

0 comments on commit fa79bb1

Please sign in to comment.