-
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
SNOW-1643030 Append username template for v1.0 PDFs #1556
Conversation
02751a1
to
0318e24
Compare
# name: test_migrating_native_app_raises_error | ||
''' | ||
+- Error ----------------------------------------------------------------------+ | ||
| Your project file contains a native app definition. Conversion of Native | | ||
| apps is not yet supported | | ||
+------------------------------------------------------------------------------+ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just removed this unused snapshot
4306f0e
to
b679d47
Compare
b679d47
to
d4c734e
Compare
d4c734e
to
82d0fee
Compare
82d0fee
to
0afb93e
Compare
1d7b757
else: | ||
# Backport the PackageV11 default name template, updated for PDFv2 | ||
package_identifier = _make_template( | ||
f"fn.concat_ids('{native_app.name}', '_pkg_', fn.sanitize_id(fn.get_username('unknown_user')) | lower)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: would be helpful to extract this naming logic out. Consider putting it near the original implementation (i.e. in api/project/util
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one nitpick (it would be nice to extract out the template stanza somewhere as it's duplicated 3 times)
When migrating v1.0 to v2.0, we need to emulate what the `NativeAppProjectModel` does when the app or package name are not specified, which is to append the `USER` env var to the generated identifier.
Pre-review checklist
Changes description
When migrating v1.0 to v2.0, we need to emulate what the
NativeAppProjectModel
does when the app or package name are not specified, which is to append theUSER
env var to the generated identifier.