Skip to content

Pulsar Functions: detect .nar files and prevent spammy logs on functions boot - #12667

Merged
eolivelli merged 1 commit into
apache:masterfrom
eolivelli:impl/better-nar-loading-master
Nov 9, 2021
Merged

eolivelli merged 1 commit into
apache:masterfrom
eolivelli:impl/better-nar-loading-master

Conversation

@eolivelli

Copy link
Copy Markdown
Contributor

Master Issue: #12645

Motivation

When Pulsar loads .jar file, it tries to unpack it a .nar and then it prints out the stack trace in #12645, that is very misleading.

Modifications

Detect the fact that we are going to load a .nar file, and do not try to unpack it if it is clear that it is not a .nar file.
We are going to preserve partially the previous behaviour and in case of FileNotFound we fallback to loading the file as .jar file as before.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • no-need-doc

    It is a small enhancement in logging

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 8, 2021
@eolivelli eolivelli added this to the 2.10.0 milestone Nov 8, 2021

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@eolivelli
eolivelli force-pushed the impl/better-nar-loading-master branch from adbcf80 to 3146763 Compare November 9, 2021 09:51
@eolivelli

Copy link
Copy Markdown
Contributor Author

Rebased onto latest master in order to see CI passing

@eolivelli
eolivelli merged commit 515a69f into apache:master Nov 9, 2021
@eolivelli
eolivelli deleted the impl/better-nar-loading-master branch November 9, 2021 11:07
eolivelli added a commit that referenced this pull request Nov 9, 2021
@eolivelli eolivelli modified the milestones: 2.10.0, 2.9.0 Nov 9, 2021
eolivelli added a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants