diff --git a/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx b/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx
index 60002ba8..828f6088 100644
--- a/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx
+++ b/src/screens/Configuration/ConfigurationV2Card/ConfigurationV2Card.tsx
@@ -16,10 +16,10 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
import { prism } from 'react-syntax-highlighter/dist/esm/styles/prism'
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
import Typography from '@material-ui/core/Typography'
-import List from "@material-ui/core/List";
-import ListItem from "@material-ui/core/ListItem";
-import ListItemIcon from "@material-ui/core/ListItemIcon";
-import RemoveCircleOutline from "@material-ui/icons/RemoveCircleOutline";
+import List from '@material-ui/core/List'
+import ListItem from '@material-ui/core/ListItem'
+import ListItemIcon from '@material-ui/core/ListItemIcon'
+import RemoveCircleOutline from '@material-ui/icons/RemoveCircleOutline'
const DeprecationWarning = () => {
const newTelemConfig =
@@ -37,22 +37,27 @@ const DeprecationWarning = () => {
-
+
+
+
TelemetryIngress.URL
and{' '}
- TelemetryIngress.ServerPubKey
will no longer be allowed.
- Please switch to TelemetryIngress.Endpoints
:
+ TelemetryIngress.ServerPubKey
will no longer be
+ allowed. Please switch to TelemetryIngress.Endpoints
:
{newTelemConfig}
-
+
+
+
- P2P.V1
will no longer be supported and must not be set in TOML
- configuration in order to boot. Use P2P.V2
instead. If you are
- using both, V1
can simply be removed.
+ P2P.V1
will no longer be supported and must not be
+ set in TOML configuration in order to boot. Use{' '}
+ P2P.V2
instead. If you are using both,{' '}
+ V1
can simply be removed.
diff --git a/src/screens/Job/JobView.tsx b/src/screens/Job/JobView.tsx
index b3e88ec2..6bdb182b 100644
--- a/src/screens/Job/JobView.tsx
+++ b/src/screens/Job/JobView.tsx
@@ -22,7 +22,6 @@ const JOB_PAYLOAD__SPEC = gql`
contractAddress
evmChainID
minIncomingConfirmations
- minIncomingConfirmationsEnv
minContractPaymentLinkJuels
requesters
}
@@ -47,19 +46,14 @@ const JOB_PAYLOAD__SPEC = gql`
}
... on OCRSpec {
blockchainTimeout
- blockchainTimeoutEnv
contractAddress
contractConfigConfirmations
- contractConfigConfirmationsEnv
contractConfigTrackerPollInterval
- contractConfigTrackerPollIntervalEnv
contractConfigTrackerSubscribeInterval
- contractConfigTrackerSubscribeIntervalEnv
evmChainID
isBootstrapPeer
keyBundleID
observationTimeout
- observationTimeoutEnv
p2pBootstrapPeers
p2pv2Bootstrappers
transmitterAddress
@@ -85,7 +79,6 @@ const JOB_PAYLOAD__SPEC = gql`
coordinatorAddress
fromAddresses
minIncomingConfirmations
- minIncomingConfirmationsEnv
pollPeriod
publicKey
requestedConfsDelay
diff --git a/src/screens/Job/TabDefinition.tsx b/src/screens/Job/TabDefinition.tsx
index ae2b8eef..56b8e308 100644
--- a/src/screens/Job/TabDefinition.tsx
+++ b/src/screens/Job/TabDefinition.tsx
@@ -15,7 +15,7 @@ interface Props {
}
export const TabDefinition = ({ job }: Props) => {
- const { definition, envDefinition } = generateJobDefinition(job)
+ const { definition } = generateJobDefinition(job)
return (
@@ -33,20 +33,6 @@ export const TabDefinition = ({ job }: Props) => {
{definition}
-
- {envDefinition.trim() && (
- <>
-
- Job attributes set by environment variables
-
-
-
-
- {envDefinition}
-
-
- >
- )}
)
diff --git a/src/screens/Job/generateJobDefinition.test.ts b/src/screens/Job/generateJobDefinition.test.ts
index 8e300fa3..402ee9c5 100644
--- a/src/screens/Job/generateJobDefinition.test.ts
+++ b/src/screens/Job/generateJobDefinition.test.ts
@@ -47,7 +47,6 @@ observationSource = """
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid Direct Request definition', () => {
@@ -63,7 +62,6 @@ observationSource = """
contractAddress: '0x0000000000000000000000000000000000000000',
evmChainID: '42',
minIncomingConfirmations: 3,
- minIncomingConfirmationsEnv: false,
minContractPaymentLinkJuels: '100000000000000',
requesters: ['0x59bbE8CFC79c76857fE0eC27e67E4957370d72B5'],
},
@@ -92,7 +90,6 @@ observationSource = """
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid Keeper definition', () => {
@@ -135,7 +132,6 @@ observationSource = """
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid Flux Monitor definition', () => {
@@ -195,7 +191,6 @@ observationSource = """
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid OCR definition', () => {
@@ -210,20 +205,15 @@ observationSource = """
spec: {
__typename: 'OCRSpec',
blockchainTimeout: '20s',
- blockchainTimeoutEnv: true,
contractAddress: '0x1469877c88F19E273EFC7Ef3C9D944574583B8a0',
contractConfigConfirmations: 3,
- contractConfigConfirmationsEnv: false,
contractConfigTrackerPollInterval: '1m0s',
- contractConfigTrackerPollIntervalEnv: false,
contractConfigTrackerSubscribeInterval: '2m0s',
- contractConfigTrackerSubscribeIntervalEnv: false,
evmChainID: '42',
keyBundleID:
'4ee612467c3caea7bdab57ab62937adfc4d195516c30139a737f85098b35d9af',
isBootstrapPeer: false,
observationTimeout: '10s',
- observationTimeoutEnv: false,
p2pBootstrapPeers: [
'/ip4/139.59.41.32/tcp/12000/p2p/12D3KooWGKhStcrvCr5RBYKaSRNX4ojrxHcmpJuFmHWenT6aAQAY',
],
@@ -248,6 +238,7 @@ name = "ocr job"
externalJobID = "00000000-0000-0000-0000-0000000000001"
gasLimit = 1_000
maxTaskDuration = "10s"
+blockchainTimeout = "20s"
contractAddress = "0x1469877c88F19E273EFC7Ef3C9D944574583B8a0"
contractConfigConfirmations = 3
contractConfigTrackerPollInterval = "1m0s"
@@ -273,7 +264,6 @@ observationSource = """
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('blockchainTimeout = "20s"\n')
})
it('generates a valid OCR Bootstrap definition', () => {
@@ -288,20 +278,15 @@ observationSource = """
spec: {
__typename: 'OCRSpec',
blockchainTimeout: '20s',
- blockchainTimeoutEnv: true,
contractAddress: '0x1469877c88F19E273EFC7Ef3C9D944574583B8a0',
contractConfigConfirmations: 3,
- contractConfigConfirmationsEnv: true,
contractConfigTrackerPollInterval: '1m0s',
- contractConfigTrackerPollIntervalEnv: true,
contractConfigTrackerSubscribeInterval: '2m0s',
- contractConfigTrackerSubscribeIntervalEnv: true,
evmChainID: '42',
isBootstrapPeer: true,
keyBundleID:
'4ee612467c3caea7bdab57ab62937adfc4d195516c30139a737f85098b35d9af',
observationTimeout: '10s',
- observationTimeoutEnv: true,
p2pBootstrapPeers: [
'/ip4/139.59.41.32/tcp/12000/p2p/12D3KooWGKhStcrvCr5RBYKaSRNX4ojrxHcmpJuFmHWenT6aAQAY',
],
@@ -326,10 +311,15 @@ name = "ocr job"
externalJobID = "00000000-0000-0000-0000-0000000000001"
gasLimit = 1_000
maxTaskDuration = "10s"
+blockchainTimeout = "20s"
contractAddress = "0x1469877c88F19E273EFC7Ef3C9D944574583B8a0"
+contractConfigConfirmations = 3
+contractConfigTrackerPollInterval = "1m0s"
+contractConfigTrackerSubscribeInterval = "2m0s"
evmChainID = "42"
isBootstrapPeer = true
keyBundleID = "4ee612467c3caea7bdab57ab62937adfc4d195516c30139a737f85098b35d9af"
+observationTimeout = "10s"
p2pBootstrapPeers = [
"/ip4/139.59.41.32/tcp/12000/p2p/12D3KooWGKhStcrvCr5RBYKaSRNX4ojrxHcmpJuFmHWenT6aAQAY"
]
@@ -343,17 +333,8 @@ observationSource = """
fetch -> parse -> multiply;
"""
`
-
- const expectedEnvDefinition = `blockchainTimeout = "20s"
-contractConfigConfirmations = 3
-contractConfigTrackerPollInterval = "1m0s"
-contractConfigTrackerSubscribeInterval = "2m0s"
-observationTimeout = "10s"
-`
-
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual(expectedEnvDefinition)
})
it('generates a valid OCR 2 definition', () => {
@@ -433,7 +414,6 @@ juelsPerFeeCoinSource = "1000000000"
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid VRF definition', () => {
@@ -451,7 +431,6 @@ juelsPerFeeCoinSource = "1000000000"
evmChainID: '42',
fromAddresses: ['0x3cCad4715152693fE3BC4460591e3D3Fbd071b42'],
minIncomingConfirmations: 6,
- minIncomingConfirmationsEnv: false,
pollPeriod: '10s',
publicKey:
'0x92594ee04c179eb7d439ff1baacd98b81a7d7a6ed55c86ca428fa025bd9c914301',
@@ -501,7 +480,6 @@ observationSource = """
`
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid Webhook definition', () => {
@@ -535,7 +513,6 @@ observationSource = """
`
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid Bootstrap definition', () => {
@@ -581,7 +558,6 @@ chainID = 1_337
`
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid blockhashstore definition', () => {
@@ -633,7 +609,6 @@ fromAddresses = [ "0x52926EF10c19E810a52f11e942E502B15c7E2fEE" ]
`
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
it('generates a valid Gateway definition', () => {
@@ -665,6 +640,5 @@ Port = 8_080
`
const output = generateJobDefinition(job)
expect(output.definition).toEqual(expectedOutput)
- expect(output.envDefinition).toEqual('')
})
})
diff --git a/src/screens/Job/generateJobDefinition.ts b/src/screens/Job/generateJobDefinition.ts
index 7b8588d4..769f67a8 100644
--- a/src/screens/Job/generateJobDefinition.ts
+++ b/src/screens/Job/generateJobDefinition.ts
@@ -3,7 +3,6 @@ import pick from 'lodash/pick'
export interface JobDefinition {
definition: string
- envDefinition: string
}
// Extracts fields from the job that are common to all specs.
@@ -29,51 +28,12 @@ const extractObservationSourceField = ({
}
}
-// Extracts the fields matching the keys from the spec. If another field of of
-// the same name with an 'Env' suffix exists, we remove it from the returned
-// object.
+// Extracts the fields matching the keys from the spec.
const extractSpecFields = (
spec: T,
...keys: K[]
) => {
- // For every key, check for the existence of an another field of the same name
- // with an 'Env' suffix
- const scopedKeys = keys.filter((key) => {
- const envKey = `${key as string}Env` as K
- if (Object.prototype.hasOwnProperty.call(spec, envKey)) {
- // We are relying on this always being a boolean but we can't guarantee it
- return !spec[envKey]
- }
-
- return true
- })
-
- return pick(spec, ...scopedKeys)
-}
-
-// Extracts the fields which have a field of the same name with an 'Env' suffix
-// and the 'Env' field returns true.
-const extractEnvValues = (spec: T) => {
- // For every key with an 'Env' suffix, find a key of the same name without the
- // suffix.
- const regex = /(.+)Env$/
- const envValueKeys: K[] = []
- for (const key of Object.keys(spec)) {
- const match = key.match(regex)
-
- if (match) {
- const envKey = key as K
- // We are relying on this always being a boolean but we can't guarantee it
- if (spec[envKey]) {
- // Check that the key without the 'Env' suffix exists
- if (Object.prototype.hasOwnProperty.call(spec, match[1])) {
- envValueKeys.push(match[1] as K)
- }
- }
- }
- }
-
- return pick(spec, ...envValueKeys)
+ return pick(spec, ...keys)
}
// Stringifies the job spec as TOML
@@ -294,7 +254,7 @@ export const generateJobDefinition = (
break
default:
- return { definition: '', envDefinition: '' }
+ return { definition: '' }
case 'WebhookSpec':
values = {
...extractJobFields(job),
@@ -306,6 +266,5 @@ export const generateJobDefinition = (
return {
definition: toTOMLString(values),
- envDefinition: toTOMLString(extractEnvValues(job.spec)),
}
}
diff --git a/support/factories/gql/fetchJob.ts b/support/factories/gql/fetchJob.ts
index 13aace93..2d283509 100644
--- a/support/factories/gql/fetchJob.ts
+++ b/support/factories/gql/fetchJob.ts
@@ -21,7 +21,6 @@ export function buildJob(
contractAddress: '0x0000000000000000000000000000000000000000',
evmChainID: '42',
minIncomingConfirmations: 3,
- minIncomingConfirmationsEnv: false,
minContractPaymentLinkJuels: '100000000000000',
requesters: ['0x59bbE8CFC79c76857fE0eC27e67E4957370d72B5'],
},