Fieri and Supermarket: What is it and what can it do for you?

What is Fieri?

Fieri is the service used by Supermarket to run select Quality Metrics on cookbook versions when they are uploaded to Supermarket

How Does It Work?

When you upload a cookbook to Supermarket, it will call the Fieri engine through the FieriNotifyWorker. Fieri will then:

  1. GET the cookbook artifact from wherever it is stored (usually either on the same server as Supermarket or an S3 bucket)
  2. Unpack the artifact
  3. Run Foodcritic on the unpacked artifact
  4. POST back the results to Supermarket
  5. GET the number of collaborators associated with the cookbook
  6. Check whether the number of collaborators is >= 2
  7. POST back the result to SupermarketIt uses a sidekiq queue for batch job processing.

Can I Use Fieri with a Private Supermarket?
Yes, with a few set up tasks. See the official Supermarket Fieri documentation for details on setting it up.

From the User Perspective
When you upload a cookbook to a Supermarket with Fieri enabled (public Supermarket definitely does), you will see a tab called “Quality” when you view the cookbook from the Supermarket GUI. Click on that tab and you will see whether the cookbook has passed the Quality Metrics.

Where Does It’s Code Live
As of Supermarket 2.7, the Fieri code is an engine within the Supermarket code. You can find the code for the engine here.

I’m a collaborator on a couple of cookbooks and I’ve noticed that Fieri only reports one quality violation:

Failure: Cookbook has 0 collaborators.

For at least one of the cookbooks I know that the cookbook fails other cookbook quality metrics. Is this expected behaviour, or the sort of thing to investigate further and potentially raise a GitHub issue for?

Follow-up question: is there a publicly-accessible definition of the quality checks executed by Fieri - aside from the lints described on the Foodcritic website?