Opened 5 months ago

Closed 4 months ago

#30435 closed defect (fixed)

Lektor builds in jenkins sometimes fail with templates problems

Reported by: emmapeel Owned by: weasel
Priority: Medium Milestone:
Component: Internal Services/Service - jenkins Version:
Severity: Normal Keywords:
Cc: boklm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by emmapeel)

Some builds of lektor in jenkins fail with:

jinja2.exceptions.UndefinedError: '_' is undefined

But if you click on 'build now' on the jenkins web interface, they usually build.

It seems like if some machines had the software needed to compile, and some not. As in many other languages, _ is the shortened expression for i18n, so it could be that the lektor-i18n plugin is missing? It looks like it installs, though, even if there is an error about 'wheels':

09:16:52 Updating packages in /home/jenkins/.cache/lektor/packages/1b7e03f6dbb11eed7da0c1e12dd75608 for project
09:16:52 Obtaining file:///srv/jenkins-workspace/workspace/lektor-website-tpo-translation/website/packages/i18n
09:16:53 Installing collected packages: lektor-i18n
09:16:53 Running setup.py develop for lektor-i18n
09:16:53 Successfully installed lektor-i18n
09:16:53 /usr/lib/python3/dist-packages/pip/_internal/commands/install.py:222: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.

Example: https://jenkins.torproject.org/job/lektor-website-tpo-translation/448/consoleFull or most of failed builds at https://jenkins.torproject.org/job/lektor-website-tpo-translation

Child Tickets

Change History (5)

comment:1 Changed 5 months ago by emmapeel

Summary: Lektor builds in jenkins sometimes fail with templates problemsLektor builds in jenkins sometimes fail but new rebuild works

comment:2 Changed 5 months ago by emmapeel

Description: modified (diff)
Summary: Lektor builds in jenkins sometimes fail but new rebuild worksLektor builds in jenkins sometimes fail with templates problems

comment:3 Changed 5 months ago by boklm

Cc: boklm added

comment:4 Changed 4 months ago by weasel

Looking at the two most recent builds of lektor-website-tpo-translation as of right now, they both built on build-x86-07.torproject.org, and one failed and the other didn't.

So it's unlikely that a difference in host setup is the reason for this failure.

comment:5 Changed 4 months ago by hiro

Resolution: fixed
Status: newclosed

The problem was rather with Lektor cache.

This is how Lektor decides where it will store its cache:
https://github.com/lektor/lektor/blob/332b8e33a484634ed514ab2160804f7f19e8e4ef/lektor/utils.py#L638

I have set the XDG_CACHE_HOME when plugins are reinstalled and when each project is built on jenkins so that the cache is local.

Note: See TracTickets for help on using tickets.