edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

feat: deprecate `track_function` and `publish` in ModuleSystem [BD-13]

Open Agrendalath opened this issue 3 years ago • 19 comments

Description

As a part of the ModuleSystem removal, we want to get rid of its remaining attributes:

  • track_function,
  • publish.

Supporting information

Sandbox instance: https://pr30046.sandbox.opencraft.hosting/ Use [email protected]:edx to log in.

Testing instructions

  1. We have replaced the remaining usages of track_function with publish, so it makes sense to check these two together.
  2. Log into the sandbox instance (private link) and check tracking logs for the next actions.
  3. Check that the grading is working. You can use this XBlock in the LMS and Preview. Check that the Studio view is working correctly too.
  4. Check that the "Show answer" button emits events.
  5. Check that the completion events are working (the completion is already enabled on the sandbox).

Other information

Private-ref: BB-5518

Agrendalath avatar Mar 11 '22 16:03 Agrendalath

Thanks for the pull request, @Agrendalath!

When this pull request is ready, tag your edX technical lead.

openedx-webhooks avatar Mar 11 '22 16:03 openedx-webhooks

@Agrendalath Just checking the status, as this has been open as a draft for a while.

natabene avatar Jul 27 '22 15:07 natabene

Author will pick this up soon.

natabene avatar Aug 08 '22 13:08 natabene

@ormsbee, would you like to do a sanity check of this PR?

Agrendalath avatar Sep 05 '22 18:09 Agrendalath

@Agrendalath I tried to test this out on the sandbox instance. But I got an error in the chemical equations problem:

image

pkulkark avatar Sep 12 '22 11:09 pkulkark

@pkulkark, it was not related to the PR. It's an old sandbox, so I manually deleted all keys matching default:1:safe_exec.* from the cache. safe_exec is working correctly now.

Agrendalath avatar Sep 13 '22 12:09 Agrendalath

@Agrendalath: Looking through this now...

ormsbee avatar Sep 13 '22 13:09 ormsbee

@ormsbee I don't think this touches any of the answer stuff we track for insights

ashultz0 avatar Sep 13 '22 14:09 ashultz0

@ashultz0: Really? I thought this was how all those events got to the tracking logs in the end...?

ormsbee avatar Sep 13 '22 15:09 ormsbee

Maybe I'm missing some of the context because I'm not familiar with this code.

Insights basically only looks at answers (and only our older types of answers), it doesn't engage with any of the completion stuff that seems to be what is being changed here.

Possibly the learner view looked at completion but 1) I don't think it did and 2) I don't have to research it because we are burning it to the ground with community OK anyway.

ashultz0 avatar Sep 13 '22 16:09 ashultz0

@ormsbee, thank you for reviewing this. I separated the static_url deprecation to #30992.

@ashultz0, this service also handles events like problem_check (analytics seem to be using it here), showanswer (listed here), etc. This PR should not alter events in any way, but this service will be passing them to the track_function, so it introduces some risk.

Agrendalath avatar Sep 14 '22 18:09 Agrendalath

thanks @Agrendalath

problem_check is the big one for the answers view so we can just validate that they are still happening as expected afterwards

ashultz0 avatar Sep 14 '22 18:09 ashultz0

@pkulkark,

P.S @Agrendalath I assume you'll be rebasing with latest master once the review is done?

Of course. Each of these BD-13 will have a conflict with the master branch once the other BD-13 PR is merged.

Agrendalath avatar Sep 16 '22 09:09 Agrendalath

@ormsbee, what are the next steps for this PR? Are we waiting for more feedback before moving forward?

Agrendalath avatar Sep 26 '22 09:09 Agrendalath

@schenedx, @jristau1984: This was the tracking log related code refactoring PR we discussed today.

ormsbee avatar Oct 18 '22 20:10 ormsbee

@ormsbee We found the tracking logs are sent to Segment app on edX side. Because of that, we can quickly verify this PR on stage and prod. Once you feel like this PR is ready, please let me know so we can merge, deploy and test with our people on the look out

schenedx avatar Oct 18 '22 20:10 schenedx

@ormsbee OK, So I made a mistake conceptually. I thought the logs sent to segment app is the same as tracking logs. This is not the case. Tracking logs are log files written into the disk, and ansible has a role to copy those logs into S3 bucket edx-all-tracking-logs. See reference here. Segment logs are sent to the segment app directly and segment will store those logs inside of S3 into a different S3 bucket. What I don't know is if these two logs are going to be logging different events, or same events or sometimes different sometimes same. Let's assume the worst that they are logging different events, I believe this logging is affecting pure tracking logs. In order to see the effect of this change, we'd have to monitor the prod instance tracking log writes unto EC2 disk. That's an SRE thing. I will help get SRE attention onto this PR.

schenedx avatar Oct 19 '22 15:10 schenedx

@ormsbee @schenedx what remains to be reviewed here to get this over the line?

e0d avatar Nov 04 '22 13:11 e0d

@e0d I asked @ormsbee to help me validate if the code in this change would touch segment tracking events as well. That said, I also wanted to get 2U SRE to be helping me with testing this change on the stage environment to ensure tracking logs are still created. Cannot validate that with the current access I have.

schenedx avatar Nov 04 '22 15:11 schenedx

@e0d I am planning to merge this PR and validate on stage Monday, Nov 14th. 2022

schenedx avatar Nov 08 '22 16:11 schenedx

@Agrendalath 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

openedx-webhooks avatar Nov 15 '22 15:11 openedx-webhooks

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

edx-pipeline-bot avatar Nov 15 '22 17:11 edx-pipeline-bot

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

edx-pipeline-bot avatar Nov 15 '22 20:11 edx-pipeline-bot