Skip to content

Replay "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils" - #25055

Merged
timmc-edx merged 1 commit into
masterfrom
revert-25025-revert-25010-timmc/metric-attribute
Sep 28, 2020
Merged

Replay "ARCHBOM-1494: Refer to custom attributes, not metrics, especially with edx-django-utils"#25055
timmc-edx merged 1 commit into
masterfrom
revert-25025-revert-25010-timmc/metric-attribute

Conversation

@timmc-edx

Copy link
Copy Markdown
Contributor

Reverts edx/edx-platform#25025 to replay https://github.com/edx/edx-platform/pull/25010 now that pipeline is unblocked.

…, especially with edx-django-utils (#25010)" (#25025)"

This reverts commit 986a448.
@edx-status-bot

Copy link
Copy Markdown

Your PR has finished running tests. There were no failures.

@timmc-edx

Copy link
Copy Markdown
Contributor Author

Pending a conflict in another release.

@patch('edx_django_utils.monitoring.set_custom_metric')
def test_access_token_metrics(self, token_type, expected_token_type, mock_set_custom_metric):
@patch('edx_django_utils.monitoring.set_custom_attribute')
def test_access_token_metrics(self, token_type, expected_token_type, mock_set_custom_attribute):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rename test methods?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good finds. Mind if I pick those up in a second PR so that this can be a clean replacement?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Go for it. Do you want to start that PR now based off this branch?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, I was thinking of just merging this one and starting a new branch to keep things simple (since this one is going to get squashed).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

...but I'm not merging this until Monday anyhow, so I might as well start there and rebase later. :-)

@patch('openedx.core.djangoapps.waffle_utils.set_custom_metric')
def test_waffle_flag_metric_for_various_settings(self, data, mock_set_custom_metric):
@patch('openedx.core.djangoapps.waffle_utils.set_custom_attribute')
def test_waffle_flag_metric_for_various_settings(self, data, mock_set_custom_attribute):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test name?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one is already covered in https://github.com/edx/edx-platform/pull/25018 as it turns out.

Comment thread requirements/edx/base.in
edx-django-utils
# edx-django-utils 3.8.0 renames metric -> attribute and deprecates the old
# methods; edx-platform calls the new names
edx-django-utils>=3.8.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: I prefer something shorter like https://github.com/edx/edx-drf-extensions/blob/master/requirements/base.in#L7, but either works.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That seems nicely terse. May still keep it on a separate line since we conventionally use the same-line comment to describe the purpose/use of the dep.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@timmc-edx
timmc-edx merged commit f29e418 into master Sep 28, 2020
@timmc-edx
timmc-edx deleted the revert-25025-revert-25010-timmc/metric-attribute branch September 28, 2020 13:53
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been rolled back from the production environment.

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