Skip to content

Commit 3fd7672

Browse files
committed
Fixed tag includes for files and large key deletions
1 parent 3bc67f6 commit 3fd7672

File tree

3 files changed

+30
-23
lines changed

3 files changed

+30
-23
lines changed

files.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,8 @@ func HandleGetFileNamespace(resp http.ResponseWriter, request *http.Request) {
667667
FileSize: file.FileSize,
668668
OrgId: file.OrgId,
669669
SuborgDistribution: file.SuborgDistribution,
670+
671+
Tags: file.Tags,
670672
})
671673
}
672674
}
@@ -696,6 +698,8 @@ func HandleGetFileNamespace(resp http.ResponseWriter, request *http.Request) {
696698
FileSize: file.FileSize,
697699
OrgId: file.OrgId,
698700
SuborgDistribution: file.SuborgDistribution,
701+
702+
Tags: file.Tags,
699703
})
700704
}
701705
}
@@ -832,6 +836,8 @@ func HandleGetFileNamespace(resp http.ResponseWriter, request *http.Request) {
832836
Md5Sum: file.Md5sum,
833837
Status: file.Status,
834838
FileSize: file.FileSize,
839+
840+
Tags: file.Tags,
835841
})
836842
}
837843
}

shared.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19048,7 +19048,7 @@ func HandleDeleteCacheKeyPost(resp http.ResponseWriter, request *http.Request) {
1904819048
cacheId := fmt.Sprintf("%s_%s", selectedOrg, tmpData.Key)
1904919049
cacheData, err := GetDatastoreKey(ctx, cacheId, tmpData.Category)
1905019050
if debug {
19051-
log.Printf("[DEBUG] Attempting to delete cache key '%s' for org %s. Error: %#v", tmpData.Key, tmpData.OrgId, err)
19051+
log.Printf("[DEBUG] Attempting to delete cache key '%s' for org %s. Error: %#v. Cache ID: %s", tmpData.Key, tmpData.OrgId, err, string(cacheId))
1905219052
}
1905319053

1905419054
if err != nil || len(cacheData.Key) == 0 {
@@ -19079,12 +19079,12 @@ func HandleDeleteCacheKeyPost(resp http.ResponseWriter, request *http.Request) {
1907919079
cacheId = fmt.Sprintf("%s_%s", cacheId, tmpData.Category)
1908019080
}
1908119081

19082+
cacheId = url.QueryEscape(cacheId)
1908219083
if len(cacheId) > 127 {
1908319084
cacheId = cacheId[:127]
1908419085
}
1908519086

1908619087
entity := "org_cache"
19087-
go DeleteKey(ctx, entity, url.QueryEscape(cacheId))
1908819088
err = DeleteKey(ctx, entity, cacheId)
1908919089
if err != nil {
1909019090
log.Printf("[WARNING] Failed to DELETE cache key %s for org %s (delete) (2)", tmpData.Key, tmpData.OrgId)

structs.go

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ type ExecutionRequest struct {
141141
}
142142

143143
type RetStruct struct {
144-
Success bool `json:"success"`
145-
SyncFeatures SyncFeatures `json:"sync_features"`
146-
SessionKey string `json:"session_key"`
147-
IntervalSeconds int64 `json:"interval_seconds"`
144+
Success bool `json:"success"`
145+
SyncFeatures SyncFeatures `json:"sync_features"`
146+
SessionKey string `json:"session_key"`
147+
IntervalSeconds int64 `json:"interval_seconds"`
148148
Subscriptions []PaymentSubscription `json:"subscriptions,omitempty"`
149149
}
150150

@@ -525,7 +525,7 @@ type Environment struct {
525525
}
526526

527527
type LakeConfig struct {
528-
Enabled bool `json:"enabled" datastore:"enabled"`
528+
Enabled bool `json:"enabled" datastore:"enabled"`
529529
Pipelines []PipelineInfo `json:"pipelines" datastore:"pipelines"`
530530
}
531531

@@ -1040,11 +1040,11 @@ type Org struct {
10401040
CreatorId string `json:"creator_id" datastore:"creator_id"`
10411041
Disabled bool `json:"disabled" datastore:"disabled"`
10421042

1043-
EulaSigned bool `json:"eula_signed" datastore:"eula_signed"`
1044-
EulaSignedBy string `json:"eula_signed_by" datastore:"eula_signed_by"`
1045-
Billing Billing `json:"Billing" datastore:"Billing"`
1046-
CreatorOrg string `json:"creator_org" datastore:"creator_org"`
1047-
Branding OrgBranding `json:"branding" datastore:"branding"`
1043+
EulaSigned bool `json:"eula_signed" datastore:"eula_signed"`
1044+
EulaSignedBy string `json:"eula_signed_by" datastore:"eula_signed_by"`
1045+
Billing Billing `json:"Billing" datastore:"Billing"`
1046+
CreatorOrg string `json:"creator_org" datastore:"creator_org"`
1047+
Branding OrgBranding `json:"branding" datastore:"branding"`
10481048
}
10491049

10501050
type Billing struct {
@@ -1144,13 +1144,13 @@ type CacheKeyData struct {
11441144
Created int64 `json:"created" datastore:"Created"`
11451145
Edited int64 `json:"edited" datastore:"Edited"`
11461146

1147-
Existed bool `json:"existed,omitempty" datastore:"Existed"` // If the key existed before the update. Should always be set back to false.
1148-
Changed bool `json:"changed,omitempty" datastore:"Changed"` // If the value was changed. Should always be set back to false.
1149-
Encrypted bool `json:"encrypted" datastore:"Encrypted"`
1147+
Existed bool `json:"existed,omitempty" datastore:"Existed"` // If the key existed before the update. Should always be set back to false.
1148+
Changed bool `json:"changed,omitempty" datastore:"Changed"` // If the value was changed. Should always be set back to false.
1149+
Encrypted bool `json:"encrypted" datastore:"Encrypted"`
11501150
FormattedKey string `json:"formatted_key,omitempty" datastore:"FormattedKey"`
11511151
PublicAuthorization string `json:"public_authorization,omitempty" datastore:"PublicAuthorization"` // Used for public authorization
11521152
SuborgDistribution []string `json:"suborg_distribution" datastore:"suborg_distribution"`
1153-
RevisionId string `json:"revision_id" datastore:"revision_id"`
1153+
RevisionId string `json:"revision_id" datastore:"revision_id"`
11541154
}
11551155
type SyncConfig struct {
11561156
Interval int64 `json:"interval" datastore:"interval"`
@@ -2568,9 +2568,9 @@ type SubResponse struct {
25682568
}
25692569

25702570
type AllTriggersWrapper struct {
2571-
Pipelines []PipelineInfo `json:"pipelines"`
2572-
WebHooks []Hook `json:"webhooks"`
2573-
Schedules []ScheduleOld `json:"schedules"`
2571+
Pipelines []PipelineInfo `json:"pipelines"`
2572+
WebHooks []Hook `json:"webhooks"`
2573+
Schedules []ScheduleOld `json:"schedules"`
25742574
}
25752575

25762576
type SubWrapper struct {
@@ -2984,6 +2984,7 @@ type BaseFile struct {
29842984
FileSize int64 `json:"filesize"`
29852985
OrgId string `json:"org_id"`
29862986
SuborgDistribution []string `json:"suborg_distribution"`
2987+
Tags []string `json:"tags,omitempty" datastore:"tags"`
29872988
}
29882989

29892990
type FileResponse struct {
@@ -2996,8 +2997,8 @@ type FileResponse struct {
29962997
type SSOConfig struct {
29972998
SSOEntrypoint string `json:"sso_entrypoint" datastore:"sso_entrypoint"`
29982999
SSOCertificate string `json:"sso_certificate" datastore:"sso_certificate"`
2999-
SSOLongCertificate string `json:"sso_long_certificate" datastore:"sso_long_certificate,noindex"`
3000-
SSOCertificateHash string `json:"sso_certificate_hash" datastore:"sso_certificate_hash"`
3000+
SSOLongCertificate string `json:"sso_long_certificate" datastore:"sso_long_certificate,noindex"`
3001+
SSOCertificateHash string `json:"sso_certificate_hash" datastore:"sso_certificate_hash"`
30013002
OpenIdClientId string `json:"client_id" datastore:"client_id"`
30023003
OpenIdClientSecret string `json:"client_secret" datastore:"client_secret"`
30033004
OpenIdAuthorization string `json:"openid_authorization" datastore:"openid_authorization"`
@@ -4188,7 +4189,7 @@ type OrborusStats struct {
41884189
// Create struct
41894190
type ExecutionReturn struct {
41904191
Success bool `json:"success"`
4191-
Id string `json:"id"`
4192+
Id string `json:"id"`
41924193
Executions []WorkflowExecution `json:"executions"`
41934194
Cursor string `json:"cursor"`
41944195

@@ -4559,7 +4560,7 @@ type AgentOutput struct {
45594560
NodeId string `json:"node_id,omitempty" datastore:"node_id"`
45604561
Memory string `json:"memory,omitempty" datastore:"memory"`
45614562
Input string `json:"input" datastore:"input"`
4562-
Output string `json:"output,omitempty" datastore:"output"`
4563+
Output string `json:"output,omitempty" datastore:"output"`
45634564
}
45644565

45654566
type HTTPWrapper struct {

0 commit comments

Comments
 (0)