-
Notifications
You must be signed in to change notification settings - Fork 55
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
Cherry-picks to 3.1.0rc1 #1752
Merged
Merged
Cherry-picks to 3.1.0rc1 #1752
Conversation
This file contains 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
sfc-gh-turbaszek
force-pushed
the
cp-3-1-0-rc-1
branch
from
October 21, 2024 13:49
c4c65e3
to
9047da0
Compare
…1735) When converting PDFv1 to PDFv2, we need to convert package scripts to post-deploy hooks, so we have to convert the `{{ package_name }}` template into the normal template syntax. When converting using `snow helpers v1-to-v2`, we convert `{{ package_name }}` to `<% ctx.entities.pkg.identifier %>` since we know that the next time the CLI is run, the template context will be v2-based and that `ctx.entities.pkg.identifier` will be a valid reference. When converting in-memory however, the template context is v1-based and since the conversion has to be transparent to the user (they could have other files with templates still using v1 references in it), we can't override the template context to v2, so `ctx.entities.pkg.identifier` is an invalid reference. Fortunately for in-memory conversions, package scripts are converted to post-deploy hooks using temp files (to avoid overwriting the user's files), so we can just insert the package name directly into the converted script instead of having to use a template reference. This requires us to defer conversion of package scripts until after the v2 definition is loaded into Pydantic since there are validators that can change the values of fields (like the test resource suffix being added to the package identifier).
…sts to use factories (#1743) * don't pass post deploy/package scripts when validating and convert tests to use factories * update test_manager for deploy in validate with no post deploy/package scripts * remove bad comment * nativeapp_project_directory -> nativeapp_teardown
… scripts (#1745) When running a post-deploy hook that comes from an auto-converted package script, the filename seen is the absolute path to the tempfile, which is confusing to users. Let's store a `display_path` for these hooks so we can show users the original path that they had put in the PDF file.
sfc-gh-turbaszek
force-pushed
the
cp-3-1-0-rc-1
branch
from
October 21, 2024 13:51
9047da0
to
c9ea73e
Compare
sfc-gh-astus
approved these changes
Oct 21, 2024
sfc-gh-mraba
approved these changes
Oct 21, 2024
sfc-gh-jsikorski
approved these changes
Oct 21, 2024
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.
Pre-review checklist
Changes description
...