Skip to content
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

Add a utility method to check if metadata collection is enabled #5748

Merged
merged 5 commits into from
Feb 19, 2020

Conversation

hithwen
Copy link
Contributor

@hithwen hithwen commented Feb 14, 2020

Add decorator to check if metadata collection is enabled

Copy link
Contributor

@ofek ofek left a comment

Choose a reason for hiding this comment

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

This seems overly complex. Why not just return a boolean?

@hithwen
Copy link
Contributor Author

hithwen commented Feb 17, 2020

This seems overly complex. Why not just return a boolean?

The idea is to put annotations on methods handling metadata instead of having same if block everywere but I agree an utility wrapper over self.agentConfig.get('enable_metadata_collection', True) would still be an improvement

@therve
Copy link
Contributor

therve commented Feb 17, 2020

Considering that we'll need to have the utility wrapper (I don't think the decorator applies to every case), I think we should just do that.

@hithwen hithwen changed the title Julia/metadata decorator Julia/metadata utility method Feb 17, 2020
@hithwen hithwen requested a review from ofek February 17, 2020 12:15
@therve therve changed the title Julia/metadata utility method Add a utility method to check if metadata collection is enabled Feb 17, 2020
therve
therve previously approved these changes Feb 17, 2020
Copy link
Contributor

@ofek ofek left a comment

Choose a reason for hiding this comment

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

🥇

@hithwen hithwen merged commit 4d722ee into master Feb 19, 2020
@hithwen hithwen deleted the julia/metadata-decorator branch February 19, 2020 10:40
This was referenced Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants