• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tensorchord / openmodelz / 6484204190

11 Oct 2023 02:47PM UTC coverage: 26.348% (-0.8%) from 27.112%
6484204190

Pull #189

github

xieydd
feat: openmodelz support deployment event

Signed-off-by: xieydd <xieydd@gmail.com>
Pull Request #189: feat: openmodelz support deployment event

19 of 19 new or added lines in 4 files covered. (100.0%)

953 of 3617 relevant lines covered (26.35%)

1.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/agent/pkg/server/user.go
1
package server
2

3
import (
4
        "context"
5

6
        "github.com/sirupsen/logrus"
7
)
8

9
func (s *Server) getUIDFromDeploymentID(ctx context.Context, id string) (string, bool) {
×
10

×
11
        uid, exit := s.cache.Get(id)
×
12
        if exit {
×
13
                return uid.(string), true
×
14
        }
×
15

16
        uid, err := s.modelzCloudClient.GetUIDFromDeploymentID(ctx, s.config.ModelZCloud.AgentToken, s.config.ModelZCloud.ID, id)
×
17
        if err != nil {
×
18
                logrus.Errorf("failed to get uid from deployment id: %v", err)
×
19
                return "", false
×
20
        }
×
21

22
        // no expiration
23
        s.cache.SetWithTTL(id, uid, 1, 0)
×
24
        return uid.(string), true
×
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc