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

Should we have a top level version for libraries? #34212

Open
ormsbee opened this issue Feb 8, 2024 · 0 comments
Open

Should we have a top level version for libraries? #34212

ormsbee opened this issue Feb 8, 2024 · 0 comments
Assignees
Labels
content libraries misc Libraries Overhaul tech work not captured in the stories

Comments

@ormsbee
Copy link
Contributor

ormsbee commented Feb 8, 2024

Do we still have a use case for maintaining a library-wide version number? If so, how would we expect it to behave if exporting/importing across instances? Can we remove the top level version for now?

Some background, from my currently-in-progress PR:

# Learning Core doesn't really have a notion of a global version number, but
# we can sort of approximate it by using the primary key of the last publish
# log entry, in the sense that it will be a monotonically increasing
# integer, though there will be large gaps. We use 0 to denote that nothing
# has been done, since that will never be a valid value for a PublishLog pk.
#
# That being said, we should figure out if we really even want to keep a top
# level version indicator for the Library as a whole. In the v1 libs
# implementation, this served as a way to know whether or not there was an
# updated version of content that a course could pull in. But more recently,
# we've decided to do those version references at the level of the
# individual blocks being used, since a Learning Core backed library is
# intended to be used for many LibraryContentBlocks and not 1:1 like v1
# libraries.
version = 0 if last_publish_log is None else last_publish_log.pk

return ContentLibraryMetadata(
    key=library_key,
    title=learning_package.title,
    type=ref.type,
    description=ref.learning_package.description,
    num_blocks=num_blocks,
    version=version,
    last_published=None if last_publish_log is None else last_publish_log.published_at,
    allow_lti=ref.allow_lti,
    allow_public_learning=ref.allow_public_learning,
    allow_public_read=ref.allow_public_read,
    has_unpublished_changes=has_unpublished_changes,
    has_unpublished_deletes=has_unpublished_deletes,
    license=ref.license,
)
@ormsbee ormsbee added the content libraries misc Libraries Overhaul tech work not captured in the stories label Feb 8, 2024
@ormsbee ormsbee self-assigned this Feb 8, 2024
@timmc-edx timmc-edx removed this from Arch-BOM Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content libraries misc Libraries Overhaul tech work not captured in the stories
Projects
None yet
Development

No branches or pull requests

1 participant