Skip to content

Commit

Permalink
Upgrade JULY to AUGUST V1 (#7)
Browse files Browse the repository at this point in the history
* schema added for aug

* required files created

* func added to transition into new jira schema

* jira translation done

* policy updated

* not needed file removed

* schema version

* schema corrected

* review comments and policy update
  • Loading branch information
priyanshishikha authored Sep 11, 2024
1 parent 2c41406 commit 6bf8a52
Show file tree
Hide file tree
Showing 16 changed files with 20,532 additions and 8,544 deletions.
11 changes: 7 additions & 4 deletions common/schemaHelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,23 @@ const (
June2024Version
June2024Version2
July2024Version
August2024Version
)

var SchemasString = map[SchemaOrder]string{
April2024Version: schemas.April2024Schema,
June2024Version: schemas.June2024Schema,
June2024Version2: schemas.June2024Version2,
July2024Version: schemas.July2024Schema,
April2024Version: schemas.April2024Schema,
June2024Version: schemas.June2024Schema,
June2024Version2: schemas.June2024Version2,
July2024Version: schemas.July2024Schema,
August2024Version: schemas.August2024Schema,
}

var schemaOrderMap = map[string]SchemaOrder{
"April2024": April2024Version,
"June2024": June2024Version,
"June2024V2": June2024Version2,
"July2024": July2024Version,
"August2024": August2024Version,
}

func (e SchemaOrder) NameOfSchema() string {
Expand Down
10 changes: 10 additions & 0 deletions common/upgradeSteps.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"upgradationScript/april2024june2024"
featuretable "upgradationScript/featureTable"
graphqlfunc "upgradationScript/graphqlFunc"
"upgradationScript/july2024august2024"
"upgradationScript/june2024june2024v2"
"upgradationScript/june2024v2july2024"

Expand Down Expand Up @@ -92,6 +93,15 @@ func beginProcessOfUpgrade(upgradeTo SchemaOrder) error {
expGraphqlClient := graphqlfunc.NewClient(Conf.ExpGraphQLAddr, Conf.ExpDgraphToken)

return june2024v2july2024.UpgradeToJuly2024(Conf.ProdGraphQLAddr, Conf.ProdDgraphToken, Conf.ExpGraphQLAddr, Conf.RemoteDgraphRestoreUrl, prodGraphqlClient, expGraphqlClient)

case August2024Version:
if err := allChecksForExpDgraph(August2024Version); err != nil {
return err
}

expGraphqlClient := graphqlfunc.NewClient(Conf.ExpGraphQLAddr, Conf.ExpDgraphToken)

return july2024august2024.UpgradeToAugust2024(Conf.ProdGraphQLAddr, Conf.ProdDgraphToken, Conf.ExpGraphQLAddr, Conf.RemoteDgraphRestoreUrl, prodGraphqlClient, expGraphqlClient)
}

logger.Sl.Debugf("no upgrade steps for %s", upgradeTo.NameOfSchema())
Expand Down
17 changes: 17 additions & 0 deletions july2024august2024/august2024/genqlient.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
schema: schema.graphql
operations:
- queries.graphql
generated: schema-generated.go
package: august2024
use_struct_references: true
bindings:
Boolean:
type: "*bool"
DateTime:
type: "*time.Time"
Int64:
type: int64
Int:
type: "*int"
ID:
type: "*string"
5 changes: 5 additions & 0 deletions july2024august2024/august2024/queries.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation AttachJiraToRunHistory($jira: [AddJiraInput!]!) {
addJira(input: $jira) {
numUids
}
}
1,564 changes: 1,564 additions & 0 deletions july2024august2024/august2024/schema-generated.go

Large diffs are not rendered by default.

Loading

0 comments on commit 6bf8a52

Please sign in to comment.