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

[Questoin] Publishing with "all artifacts" option does not support subtractive changes #596

Closed
windy1 opened this issue Jul 23, 2024 · 4 comments
Labels
question Further information is requested

Comments

@windy1
Copy link

windy1 commented Jul 23, 2024

Release version

v5.1.4

Describe the bug

When running the publisher, my expectation is that artifacts that do not exist in the source, should be deleted from the remote APIM instance if they exist. This does not seem to be the case. After making multiple changes and then publishing "all artifacts" artifacts that were removed n commits ago remain in the remote instance.

Expected behavior

I expect that artifacts that are in the remote APIM instance but not the artifact repo, should be removed.

Actual behavior

The artifacts are not removed from the remote instance.

Reproduction Steps

  1. Create a commit that deletes a named value
  2. Make another commit that changes something else
  3. Publish all artifacts
  4. Observe that the named value has not been deleted
Copy link

  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.

@waelkdouh
Copy link
Contributor

If you delete an item as part of the commit then it will be deleted from the target environment that the publisher is publishing to. Remember that the publisher picks up the last commit. So if you delete something part of commit 1 and then do something else as part of commit 2 then the only thing that will be published is what is part of commit 2.

@waelkdouh waelkdouh added the question Further information is requested label Jul 23, 2024
@waelkdouh waelkdouh changed the title [BUG] Publishing with "all artifacts" option does not support subtractive changes [Questoin] Publishing with "all artifacts" option does not support subtractive changes Jul 23, 2024
@windy1
Copy link
Author

windy1 commented Jul 23, 2024

I see. Thank you for the quick response. Are there any plans to support a full-sync with the remote instance? We have also encountered situations where resources with dependencies on other resources are not deleted in the correct order if we want to delete both at once, which requires a multi-stage deployment and is not ideal. This is especially problematic when doing deployments that require deletion of sensitive resources (consider deleting a product and an API route that uses that product).

@guythetechie
Copy link
Contributor

@windy1 - we unfortunately don't support this. Will add to our roadmap for investigation, but it's going to be low on our priority list. See #154 for options, will close this issue in favor of that one.

@guythetechie guythetechie closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants