Add convenience overload for exporting a project's source zip#4002
Open
zikunz wants to merge 3 commits into
Open
Add convenience overload for exporting a project's source zip#4002zikunz wants to merge 3 commits into
zikunz wants to merge 3 commits into
Conversation
Collaborator
|
Can one of the admins verify this patch? |
1 similar comment
Collaborator
|
Can one of the admins verify this patch? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR accomplish?
Description
This adds a two argument exportProjectSourceZip(userId, projectId) overload to FileExporter and FileExporterImpl. It performs the standard source only export and returns the project's .aia archive, delegating to the existing exportProjectSourceZip with the same defaults already used by exportSelectedProjectsSourceZip and exportAllProjectsSourceZip. The goal is to give callers that only need a project's .aia a single entry point, rather than repeating the full set of export flags. The change is purely additive and follows the existing exportProjectOutputFile overload pattern.
Testing Guidelines
A new unit test, testExportProjectSourceZipWithDefaults in FileExporterImplTest, builds a project with source and output files, calls the new two argument overload, and asserts that the returned zip contains only the two source files and no remix history. This mirrors the existing testExportProjectSourceZipWithoutHistory test. A second test, testExportProjectSourceZipWithDefaultsNonExistingProject, calls the overload for a non-existing project and asserts that it throws, mirroring the existing testExportProjectSourceZipWithNonExistingProject test. It can be run with the AiServerLibTests target, for example ant AiServerLibTests with test_name set to com.google.appinventor.server.FileExporterImplTest.
Context for the changes
This is a server side change to the appengine module. It does not affect the companion or the device, and it does not change any blocks or designer API. It branches from master.
If your code changes how something works on the device (i.e., it affects the companion):
I have made no changes that affect the companion
I branched from
ucrMy pull request has
ucras the baseFurther, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):
For all other changes:
I have made no changes that affect the master branch
I branched from
masterMy pull request has
masteras the baseGeneral items:
ant testspasses on my machine