Skip to content

Commit

Permalink
Add 2.1+ version in job spec (#12184)
Browse files Browse the repository at this point in the history
* Add 2.1+ version in job spec and update changelog for old transmitter change

* remove retro changelog

* fix integration-tests for v2.2 (#12185)

---------

Co-authored-by: Anirudh Warrier <[email protected]>
  • Loading branch information
infiloop2 and anirudhwarrier authored Feb 27, 2024
1 parent 3666e4d commit 728a7ab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,9 @@ func (d *Delegate) newServicesOCR2Keepers(
switch cfg.ContractVersion {
case "v2.1":
return d.newServicesOCR2Keepers21(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec)
case "v2.1+":
// Future contracts of v2.1 (v2.x) will use the same job spec as v2.1
return d.newServicesOCR2Keepers21(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec)
case "v2.0":
return d.newServicesOCR2Keepers20(lggr, jb, bootstrapPeers, kb, ocrDB, lc, ocrLogger, cfg, spec)
default:
Expand Down
7 changes: 3 additions & 4 deletions integration-tests/actions/automation_ocr_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,10 @@ func CreateOCRKeeperJobs(
bootstrapP2PId := bootstrapP2PIds.Data[0].Attributes.PeerID

var contractVersion string
// TODO: use v2.1 for registry 2.2 for now until AUTO-9033 is done
if registryVersion == ethereum.RegistryVersion_2_1 || registryVersion == ethereum.RegistryVersion_2_2 {
if registryVersion == ethereum.RegistryVersion_2_2 {
contractVersion = "v2.1+"
} else if registryVersion == ethereum.RegistryVersion_2_1 {
contractVersion = "v2.1"
} else if registryVersion == ethereum.RegistryVersion_2_0 {
contractVersion = "v2.0"
} else {
require.FailNow(t, "v2.0, v2.1, and v2.2 are the only supported versions")
}
Expand Down
5 changes: 3 additions & 2 deletions integration-tests/actions/automation_ocr_helpers_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ func CreateOCRKeeperJobsLocal(
bootstrapP2PId := bootstrapP2PIds.Data[0].Attributes.PeerID

var contractVersion string
// TODO: use v2.1 for registry 2.2 for now until AUTO-9033 is done
if registryVersion == ethereum.RegistryVersion_2_1 || registryVersion == ethereum.RegistryVersion_2_2 {
if registryVersion == ethereum.RegistryVersion_2_2 {
contractVersion = "v2.1+"
} else if registryVersion == ethereum.RegistryVersion_2_1 {
contractVersion = "v2.1"
} else if registryVersion == ethereum.RegistryVersion_2_0 {
contractVersion = "v2.0"
Expand Down
5 changes: 3 additions & 2 deletions integration-tests/actions/automationv2/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,9 @@ func (a *AutomationTest) AddBootstrapJob() error {

func (a *AutomationTest) AddAutomationJobs() error {
var contractVersion string
// TODO: use v2.1 for registry 2.2 for now until AUTO-9033 is done
if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_1 || a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_2 {
if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_2 {
contractVersion = "v2.1+"
} else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_1 {
contractVersion = "v2.1"
} else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_0 {
contractVersion = "v2.0"
Expand Down

0 comments on commit 728a7ab

Please sign in to comment.