1. Bug / footgun calling slice.delete()

Bug / footgun calling slice.delete()

Home Forums FABRIC General Questions and Discussion Bug / footgun calling slice.delete()

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7089
    Sunjay Cauligi
    Participant

      If you call slice.delete() on a slice that hasn’t been submitted yet, then fablib deletes all of your slices.

      Discovered due to seemingly-benign code I was running like so:

      try:
        slice = fablib.new_slice(name="test")
        # ... add nodes/networks to slice ...
        slice.submit()
      except:
        slice.delete()

      It seems to be because the slice object’s .sm_slice field is set to None, which is treated by one of the underlying APIs as denoting “delete all” instead of “unknown slice”.

      #7092
      Komal Thareja
      Participant

        Thank you for sharing this Sunjay, we will fix this in the next version.

        Thanks,

        Komal

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.
      FABRIC invites nominations for four awards recognizing innovative uses of FABRIC resources—Best Published Paper, Best FABRIC Matrix, Best FABRIC Experiment, and Best Classroom Use of FABRIC — submissions due by **Monday, February 24 at 11:59 PM ET**, and winners announced at KNIT10. [>>>Submit Form](https://docs.google.com/forms/d/e/1FAIpQLSeTp3i2iDhB7bHgN8ryMxZci8ya87yjeQd7_JMZImUodNinVA/viewform)

      KNIT10 Call for Demos Now Open! Submit your demo by **February 24**. [>>>Submit Demo](https://docs.google.com/forms/d/e/1FAIpQLScRIWqHliNP3DFWBCnalYN_fBXJXVM0PpP9YWWJdSebC95TvA/viewform)
      FABRIC invites nominations for four awards recognizing innovative uses of FABRIC resources—Best Published Paper, Best FABRIC Matrix, Best FABRIC Experiment, and Best Classroom Use of FABRIC — submissions due by **Monday, February 24 at 11:59 PM ET**, and winners announced at KNIT10. [>>>Submit Form](https://docs.google.com/forms/d/e/1FAIpQLSeTp3i2iDhB7bHgN8ryMxZci8ya87yjeQd7_JMZImUodNinVA/viewform)

      KNIT10 Call for Demos Now Open! Submit your demo by **February 24**. [>>>Submit Demo](https://docs.google.com/forms/d/e/1FAIpQLScRIWqHliNP3DFWBCnalYN_fBXJXVM0PpP9YWWJdSebC95TvA/viewform)