Skip to content

Conversation

@mikix
Copy link
Contributor

@mikix mikix commented Feb 28, 2022

They are being sunset and we no longer want to link to them.

Because I started paying attention to key structure, I also updated the default course factories to use new-style keys and updated some tests to match.

(My first swing at this was on the LMS side to mark them hidden, but prospectus still generates pages for those courses, just doesn't include them in search/browse results. So this is a step further.)

DEPR-58

@mikix mikix force-pushed the mikix/old-mongo-not-marketable branch 3 times, most recently from 4536668 to ed8bb72 Compare March 1, 2022 16:27
self.client.force_authenticate(self.user)
self.course = CourseFactory(partner=self.partner, key='simple_key')
self.course_run = CourseRunFactory(course=self.course)
self.course_run = CourseRunFactory(course=self.course, key='simple/key/run')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried but failed to figure out how to properly escape a modern-style key for elasticsearch (presumably have to encode the colon and plus somehow), so I just used an old-style key instead. The point of the test is whether we can pass the key around, not the encoding specifically, so I just called it a day. No worse than before anyway.

@mikix mikix marked this pull request as ready for review March 1, 2022 18:06
Comment on lines +1986 to +1988
if CourseKey.from_string(self.key).deprecated: # Old Mongo courses are not marketed
return False
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual point of this PR - rest is test fixes to accomodate this.

@mikix mikix force-pushed the mikix/old-mongo-not-marketable branch from ed8bb72 to 38bee67 Compare March 7, 2022 20:47
They are being sunset and we no longer want to link to them.

DEPR-58
@mikix mikix force-pushed the mikix/old-mongo-not-marketable branch from 38bee67 to 1c60c01 Compare March 8, 2022 13:57
@mikix mikix merged commit 687bdd2 into master Mar 8, 2022
@mikix mikix deleted the mikix/old-mongo-not-marketable branch March 8, 2022 18:36
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.

2 participants