Skip to content

Conversation

@chibie
Copy link
Contributor

@chibie chibie commented Oct 4, 2021

Description

grants explorer broke due get_clr_rounds_metadata update

Refers/Fixes

https://gitcoincore.slack.com/archives/CDML7FS7M/p1633365131046300

Testing

def handle(self, *args, **options):

_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chibie This is a quick fix, but this method is extremely fragile. It feels like it should be returning an object, not a tuple that we can access data on without guessing how many and where the _ should go. I approve this so we can fix the deploy, but let's open a new tech debt ticket in Jira to fix this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ksolo yea makes perfect sense

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a named tuple would likely provide enough of an abstraction to prevent these types of bugs - https://docs.python.org/3/library/collections.html#collections.namedtuple

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ticket is GITC-477

@chibie chibie merged commit 34527d8 into master Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants