Auto-connect request for Spark client snap


I am working on a snap for Spark client for K8s.

I would like to request the auto-connect permissions for the following:

- enable-kubeconfig-access
- enable-scala-history

Both plugs derive from the system-files interface, and are described here.

enable-kubeconfig-access read access is needed by the setup command to read the kubeconfig file. enable-scala-history write access is needed by spark-shell to maintain command history of the spark interactive session.

Thank you

I’ve re-tagged this into the “store-requests” category, so that the reviewers see it.


As per The personal-files interface enable-kubeconfig-access should be named dot-kube-config, similarly enable-scala-history should be named dot-scala-history.

+1 for use-of and auto-connect dot-kube-config for read access to ~/.kube/config since this is required for a snap which is a K*s client such as Spark.

However I don’t think it is really appropriate to auto-connect write access to a file which is not clearly owned by this snap (ie ~/.scala_history). As such, +1 for use of but not auto-connect of dot-scala-history for write access to ~/.scala_history.

Can other @reviewers please vote too?

+1 for use-of and auto-connect dot-kube-config for read access from me, as well.

@Abhishek can you explain a bit more on the scala command history usage?

Hi Igor and Alex, thanks for helping out with this!

~/.scala_history is where Spark’s interactive shell writes the history of commands executed on the shell. Unfortunately, it’s not optional and the shell crashes if the file cannot be created and written to.

Can you write the commands into the snap common dir?

According to you should be able to specify the snap-specific location for this as @igor suggested - ie. something like the following should work - which you can include in the command for this spark-shell app in your snapcraft.yaml:

--conf "$SNAP_USER_COMMON/.scala_history"
1 Like

Hi @Abhishek,

I assume you mean personal-files, right?

Let us know if you can specify the location for the executed commands history as suggested. Otherwise, you can still plug the interface and ask the users to manually connect the interface instead.

Hi @emitorino,

Apologies, yes I meant personal-files.

As suggested, I have removed the dot-scala-history connection from the snapcraft.yaml and renamed the other one to dot-kube-config.

Kindly approve the autoconnect request for dot-kube-config.

Hi @alexmurray, I have made changes as you suggested. Kindly approve my auto-connect request for dot-kube-config so that I can auto publish to snap store within my CI pipeline.

+2 votes for, 0 votes against use-of and auto-connect of a personal-files instance named dot-kube-config providing read access ~/.kube/config. This is now live.

Thanks @alexmurray and @emitorino! :slight_smile:

1 Like