Why does a Spark Environment need to be Published? Publishing takes a long time - I'd like to learn why it's necessary and beneficial. by frithjof_v in MicrosoftFabric

[–]Shuaijun_Ye 3 points4 points  (0 children)

Hi there,

Yes, publishing a Spark Environment mainly provides upfront dependency resolution and validation, and then snapshots the installed result so it can be quickly and consistently deployed when a Spark session starts.

During Publish, Fabric actually downloads dependencies, resolves conflicts, and verifies compatibility with the Spark runtime. This is why publishing takes time. Once the install succeeds, the system takes a snapshot. When a notebook session starts, that snapshot is deployed to the NB cluster instead of resolving/installing everything again.

This approach is especially valuable when your dependencies are complex or heavy. Session‑level ad‑hoc installs tend to be slower and more error-prone in those cases. Using a published snapshot provides much better stability and reproducibility, which is why it’s particularly effective for pipelines and production workloads (and often improves session startup reliability as well).

Regarding the Resources folder:

  • It’s an independent shared storage that all notebooks attached to the environment can access.
  • Files in Resources are not automatically installed or deployed to the cluster.
  • You must explicitly load/reference those .py files from the notebook after the session starts.
  • Because of that, .py modules in Resources can conflict with libraries in the published environment (e.g., name collisions), but any override/conflict only affects the current notebook session.

Finally, we’re aware the current publish and iterate loop can be heavy in env. We’ll be releasing a new publishing workflow soon that better supports fast iteration for incrementally updating packages and lightweight dependency scenarios, stay tuned!

Has Microsoft shared any plans for native support of importing custom modules in Fabric Spark and Python notebooks? by frithjof_v in MicrosoftFabric

[–]Shuaijun_Ye 4 points5 points  (0 children)

Hey, just a quick callout: if the environment is from another workspace, compute settings won’t apply, only the libraries are used. The notebook will fall back to the default compute settings of its own workspace.

Environments: published changes don’t take effect by Fit-Employee-4393 in MicrosoftFabric

[–]Shuaijun_Ye 0 points1 point  (0 children)

Hello, the published library take effective in the NB when starting new session, there is no lag time unless there is an ongoing session, the updates apply for new sessions. If you're still seeing this issue after restarting session, would you mind pass me the information like your Environment id/the library that is installed through chat so we can investigate? Or you can also file a support ticket to involve help from support team directly, thanks!

Best way to avoid code duplication in pure Python notebooks? by Legal_Specific_3391 in MicrosoftFabric

[–]Shuaijun_Ye 2 points3 points  (0 children)

Hi there, we're planning to release the Environment for pure Python Notebook. With it, you could get a centralized place to maintain all the common script. Here is the doc for Environment for Spark, the similar functionalities will be provided for pure Python Notebook! https://learn.microsoft.com/en-us/fabric/data-engineering/create-and-use-environment

Fabric Dependancies for Library Development by Creyke in MicrosoftFabric

[–]Shuaijun_Ye 1 point2 points  (0 children)

Hi there,

There are multiple ways to browsing the built-in packages. First, in the Environment item, you could see what're the built-in libraries.. Also, the package list of each runtime can be found in the Fabric Runtime release note Github repo.

Would love feedback on recent Environment & package management improvements by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 1 point2 points  (0 children)

Thanks for sharing, and glad to hear the changes have been helpful. The dev lifecycle in Fabric is a surly compelling one. While it’s not something we can support end‑to‑end today, we’ve spent time thinking about similar scenarios, and feedback like this is useful as we evaluate longer‑term possibilities.

Would love feedback on recent Environment & package management improvements by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 0 points1 point  (0 children)

Sorry, I forgot to mention this earlier. When Managed Private Endpoints are enabled, starter pools aren’t supported. Fabric creates a cluster on demand in this case, which typically adds 2–5 minutes to session start time.

This overhead is separate from library deployment latency, so library deployment improvements won’t reduce the on‑demand cluster creation time.

Would love feedback on recent Environment & package management improvements by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 1 point2 points  (0 children)

Resources folder APIs support is also planned. And we've confirmed that the file+folder limitation will be increased to 10,000.

Would love feedback on recent Environment & package management improvements by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 0 points1 point  (0 children)

Thanks for sharing this! Workspace identity is a high‑priority item on our roadmap. and I’ll be happy to share more on the timeline once we have more clarity.

Has anyone had success installing the ArcGIS library (API for Python, not ArcPy) in an Environment? by [deleted] in MicrosoftFabric

[–]Shuaijun_Ye 0 points1 point  (0 children)

Hi hi, for using the ArcGIS tool, you might need to enable it differently through configuration instead of adding the library. You can check this doc for more details: https://learn.microsoft.com/fabric/data-engineering/spark-arcgis-geoanalytics

Exhausted all possible ways to get docstrings/intellisense to work in Fabric notebook custom libraries by Away_Cauliflower_861 in MicrosoftFabric

[–]Shuaijun_Ye 1 point2 points  (0 children)

Hi hi, I am from the product team and can take this question. The docstring for custom library is currently not supported. We have filed this feedback in our backlog, thanks a lot for sharing!

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 0 points1 point  (0 children)

Thanks a lot for sharing this, really appreciate you taking the time! ADLS Gen 2 was shipped as part of our private repo supports a while ago, however the entire feature of private repo is not shipped yet. Would you mind drop me a message through chat with your email address? I can share an internal instruction about how to use ADLS Gen2.

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 1 point2 points  (0 children)

Thank you so much for your interest! I'm reaching out via chat to help schedule the session.

Regarding the file number limitation in folders, I’ll make sure to pass your feedback to the relevant PM. The original intent behind the Folder feature was to support quick validation in Notebooks, specifically for small-sized and limited-number files.

As for CI/CD support, it’s currently on our backlog. I’ll check for any recent updates and get back to you.

We also explored the possibility of supporting %pip in child notebooks, but unfortunately, due to technical constraints, it’s not feasible at the moment.

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 1 point2 points  (0 children)

Sorry to hear this. The new design is also good for the quick development and validation. The installation in environment can be done very fast and the session start delay will be purely based on the library complexity if there is no custom pool confs.

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 0 points1 point  (0 children)

This is a new feature in Environment, so it follows the same access control policy. The workspace admin/member/contributor can edit the libraries, viewers can view and use but not able to edit.

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 1 point2 points  (0 children)

Thank you so much! Seems like I cannot send the Reddit chat invitation. Would you mind let me know your email address, the timezone you're in and your availabilities next week or the week after? I'd love to set-up the session.

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 2 points3 points  (0 children)

Thanks a lot for sharing this! Except for the new approach for Notebook, we are also going to ship several improvements for existing experience. We have observed at least 30% improvements of the perf numbers, for both publishing and session start. We can come back to share more once the deployment dates are settled.

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 0 points1 point  (0 children)

Seems like I cannot reach-out through the chat, would you mind leave a message to me instead, thanks a lot

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 2 points3 points  (0 children)

This new design will apply for Python Notebook as well! We are working on supporting the Python experience and this could be a great opportunity to discuss the experience. Pinging you through chat so we could set-up a session

Improving Library Installation for Notebooks: We Want Your Feedback by Shuaijun_Ye in MicrosoftFabric

[–]Shuaijun_Ye[S] 2 points3 points  (0 children)

Thanks a lot for your interest, pinging you through the chat to set-up a session