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

Cherry-picks to 3.1.0rc1 #1752

Merged
merged 7 commits into from
Oct 21, 2024
Merged

Cherry-picks to 3.1.0rc1 #1752

merged 7 commits into from
Oct 21, 2024

Conversation

sfc-gh-turbaszek
Copy link
Contributor

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

...

@sfc-gh-turbaszek sfc-gh-turbaszek requested review from a team as code owners October 21, 2024 10:53
@sfc-gh-turbaszek sfc-gh-turbaszek changed the title Cp 3 1 0 rc 1 Cherry-picks to 3.1.0rc1 Oct 21, 2024
@sfc-gh-turbaszek sfc-gh-turbaszek changed the base branch from main to release-v3.1.0 October 21, 2024 10:53
sfc-gh-fcampbell and others added 6 commits October 21, 2024 15:51
…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 sfc-gh-turbaszek merged commit ce39e14 into release-v3.1.0 Oct 21, 2024
21 checks passed
@sfc-gh-turbaszek sfc-gh-turbaszek deleted the cp-3-1-0-rc-1 branch October 21, 2024 14:50
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.

6 participants