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 "legacy" parameter to PublishedProject.zip_name #2134

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

bemoody
Copy link
Collaborator

@bemoody bemoody commented Nov 17, 2023

We would like to avoid including the project title in zip file names as well as in the zip file contents, in favor of the project slug, which is more stable and machine-readable. (See issue #1674 for more background.)

Eventually, therefore, the behavior of the zip_name function should be changed; as a first step in that direction, add an optional argument so callers can specify whether they want the old or new style.

Existing code continues to use the old style for now, but when we upload zip files to S3 I'd like to rename the zip files to the new style (see issue #2122). Adding the code in PublishedProject should make that easier and cleaner, and allow the rest of the site to be migrated eventually.

We would like to avoid including the project title in zip file names
as well as in the zip file contents, in favor of the project slug,
which is more stable and machine-readable.

Eventually, therefore, the behavior of the zip_name function should be
changed; as a first step in that direction, add an optional argument
so callers can specify whether they want the old or new style.
Existing code continues to use the old style for now.
@tompollard
Copy link
Member

Thanks, looks good! As next steps, could we:

  • Set the default argument to legacy=False (or remove it altogether?)
  • Update all references to the zipfiles to a try/except (try: new_zipfile; except legacy_zipfile)?

We can discuss at: #1674

@tompollard tompollard merged commit 668a5b1 into dev Nov 19, 2023
11 checks passed
@tompollard tompollard deleted the bm/zip-name-legacy-flag branch November 19, 2023 18:58
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