Skip to content

Commit

Permalink
fix: update oct schema & a step (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
genos1998 authored Nov 25, 2024
1 parent 54bf01d commit b9e702d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions schemas/october2024.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ type BuildTool {
tool: String! @search(by: [exact])
"buildName is the name of the job/pipeline/action"
buildName: String! @search(by: [exact, regexp])
buildUrl: String! @search(by: [exact])
buildUrl: String! @search(by: [exact, regexp])
"buildTime is the time at which the artifact was built"
buildTime: DateTime
"buildUser is the user that built the artifact"
Expand Down Expand Up @@ -729,7 +729,7 @@ type ComponentAnalysis {
Licenses: [String!] @search(by: [exact,regexp])
CreatedAt: DateTime
ScannedAt: DateTime
LastViewed: DateTime
LastViewed: DateTime @search
}
type ComponentLicenses {
Expand All @@ -739,6 +739,7 @@ type ComponentLicenses {
}
enum Severity {
apocalypse
critical
high
medium
Expand Down
8 changes: 4 additions & 4 deletions september2024october2024/upgradesteps.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ func UpgradeToOctober2024(prodGraphUrl, prodToken, restoreServiceUrl string, pro
return fmt.Errorf("UpgradeToSeptember2024: migrateBuildToSourceNode: %s", err.Error())
}

if err := updateComponent(prodDgraphClient); err != nil {
return fmt.Errorf("UpgradeToSeptember2024: updateComponent: %s", err.Error())
}

if err := graphqlfunc.UpdateSchema(prodGraphUrl, prodToken, []byte(schemas.October2024Schema)); err != nil {
return fmt.Errorf("UpgradeToOctober2024: UpdateSchema: %s", err.Error())
}

if err := updateComponent(prodDgraphClient); err != nil {
return fmt.Errorf("UpgradeToSeptember2024: updateComponent: %s", err.Error())
}

if restoreServiceUrl != "" {
if err := graphqlfunc.BackupAndRestoreDgraph(prodGraphUrl, restoreServiceUrl); err != nil {
return fmt.Errorf("UpgradeToOctober2024: BackupAndRestoreDgraph: %s", err.Error())
Expand Down

0 comments on commit b9e702d

Please sign in to comment.