Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice.submit() duplicates Slice.modify() #265

Open
sajith opened this issue Dec 22, 2023 · 0 comments
Open

Slice.submit() duplicates Slice.modify() #265

sajith opened this issue Dec 22, 2023 · 0 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@sajith
Copy link
Member

sajith commented Dec 22, 2023

Slice.submit() does this:

if self._is_modify():
(
return_status,
slice_reservations,
) = self.fablib_manager.get_slice_manager().modify(
slice_id=self.slice_id, slice_graph=slice_graph
)

But Slice.modify() also does that:

(
return_status,
slice_reservations,
) = self.fablib_manager.get_slice_manager().modify(
slice_id=self.slice_id, slice_graph=slice_graph
)

One difference between them is that, since #264, Slice.submit() does the extra work of re-running post-boot scripts on modify. (There could be other differences as well; I haven't checked thoroughly.)

Both methods performing roughly equivalent action could be a source of confusion. What are our options here?

  • Refactor common code, or
  • Remove modify(), and use submit() instead, or
  • Document the difference between them, or
  • Do nothing?
@sajith sajith added help wanted Extra attention is needed question Further information is requested labels Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant