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

Build from .tar.gz sources once flytekit sourc includes package data #16

Closed
asford opened this issue Jul 19, 2022 · 1 comment
Closed

Comments

@asford
Copy link
Contributor

asford commented Jul 19, 2022

Reason for Build Failure: 1/N

There is a file, template.html that is not found in the pypi source. This needs fixing the upstream repository by:

  • adding this template.html file to MANIFEST.in if somehow it is unavailable in the pypi source
  • fixing jinja2 template loading with autoescaping

See: flyteorg/flytekit#1088

1102 jinja2.exceptions.TemplateNotFound: template.html

(error)

Some of the places in the code where template.html is called from.

  • jinja2/loaders.py:

    raise TemplateNotFound(template)
  • errors originating from flytekit:

    import flytekit
    
    # flytekit/__init__.py", line 164, in <module>
    from flytekit.core.base_sql_task import SQLTask
    
    # flytekit/core/base_sql_task.py", line 4, in <module>
    from flytekit.core.base_task import PythonTask, TaskMetadata
    
    # flytekit/core/base_task.py", line 42, in <module>
    from flytekit.deck.deck import Deck
    
    # flytekit/deck/__init__.py", line 1, in <module>
    from .deck import Deck
    
    # flytekit/deck/deck.py", line 115, in <module>
    template = env.get_template("template.html")
See Error Details | Time Elasped: 3:57 s

import: 'flytekit'
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/test_tmp/run_test.py", line 2, in <module>
    import flytekit
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/flytekit/__init__.py", line 164, in <module>
    from flytekit.core.base_sql_task import SQLTask
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/flytekit/core/base_sql_task.py", line 4, in <module>
    from flytekit.core.base_task import PythonTask, TaskMetadata
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/flytekit/core/base_task.py", line 42, in <module>
    from flytekit.deck.deck import Deck
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/flytekit/deck/__init__.py", line 1, in <module>
    from .deck import Deck
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/flytekit/deck/deck.py", line 115, in <module>
    template = env.get_template("template.html")
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/jinja2/environment.py", line 1010, in get_template
    return self._load_template(name, globals)
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/jinja2/environment.py", line 969, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/jinja2/loaders.py", line 126, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/home/conda/feedstock_root/build_artifacts/flytekit_1656731293461/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.10/site-packages/jinja2/loaders.py", line 218, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: template.html
Tests failed for flytekit-1.1.0-pyhd8ed1ab_0.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
WARNING:conda_build.build:Tests failed for flytekit-1.1.0-pyhd8ed1ab_0.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
TESTS FAILED: flytekit-1.1.0-pyhd8ed1ab_0.tar.bz2

Originally posted by @sugatoray in #14 (comment)

@asford asford changed the title flytekit source does not include package data Build from .tar.gz sources once flytekit sourc includes package data Jul 19, 2022
@asford asford closed this as completed Jan 13, 2023
@asford
Copy link
Contributor Author

asford commented Jan 13, 2023

Closed in #27

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

No branches or pull requests

1 participant