-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds deployment labels on Forwarder deployment #16653
base: develop
Are you sure you want to change the base?
Adds deployment labels on Forwarder deployment #16653
Conversation
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌35 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌35 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌9 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌9 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌6 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs-02ce8d70-9a8f-45d9-a8ff-1868363e23c2.json. |
…one-forwarder-deployment-lbls
@@ -131,8 +131,23 @@ func GetContractSets(lggr logger.Logger, req *GetContractSetsRequest) (*GetContr | |||
return nil, fmt.Errorf("failed to get addresses for chain %d: %w", id, err) | |||
} | |||
|
|||
// Forwarder addresses now have informative labels, but we don't want them to be ignored if no labels are provided for filtering. | |||
// If labels are provided, just filter by those. | |||
forwarderAddrs := make(map[string]deployment.TypeAndVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm confused by this. can we add some tests?
i think line 145 should 'just do this'. if there are no labels, then 145 should return everything. if there are labels, then it will filter them.
why are forwarder addrs being treated so differently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they have labels, line 145 is keeping them out since we are not passing any labels on req.Labels...
and if we pass any, it will just return what's specified on the labels and keep the other addresses out of it.
This was added here: #16464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, not passing labels keep addresses with labels out of the resulting slice, if that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's refactor this into two different cases. if the input Labels are empty then set filtered = deployment.LabeledAddresses
and if they are not empty, do filtered.LabeledAddresses(addrs).And(...)
that will maintain the current behavior while also supporting non-empty input labels correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krehermann this is the same as it was before this change. We need to then on each call in which we want all contract sets (unlabeled and forwarders), for example to call TransferableContracts()
, we need to call GetContractSets()
twice: one without input labels and one with input labels. Because passing labels only return the addresses that match ALL labels, not SOME labels.
So taking that into consideration, it would be one call for all unlabeled contracts, and X calls for X forwarder contract address...
This is why I went with keeping the forwarder addresses here since the label filtering doesn't take into consideration the fact that we may have informational labeled addresses, and that we would like to bring those each time, regardless on whether we pass a labels input or not.
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌1 Results
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs-0a04c0a2-cd22-4f02-a7ad-5864338e2aa7.json. |
|
This PR addresses the first part of https://smartcontract-it.atlassian.net/browse/CRE-338, which consists of tracking deployment information of the Forwarder contract as part of the
TypeAndVersion
labels.This deployment info consists of block number and transaction hash. We want to use this info to later fetch
SetConfig
events to generate the view in a more performant way.Related PRs
ForwarderView
forKeystoneView
" #16637 -> this will be re-added after validating that the labels approach is OK.Requires
Supports