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

Copied (spoke) products are not deleted when the hub product is #273

Open
RobReus opened this issue May 27, 2020 · 7 comments
Open

Copied (spoke) products are not deleted when the hub product is #273

RobReus opened this issue May 27, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@RobReus
Copy link
Contributor

RobReus commented May 27, 2020

When deleting a product via the factory (by setting Status: terminated), the products are not removed from the spokes when the product_generation_method is set to copy. This creates a mess that has to be manually cleaned up.

I looked through the code, and I am not seeing any logic whatsoever to actually delete individual products. Am I correct or am I missing something?

Steps to reproduce

  1. Create portfolio with products on the hub
  2. Share with spoke
  3. Delete product on hub and let the factory pipeline finish
  4. Run puppet pipeline

Expected results

I expect the copied product to be deleted once it has been deleted from the portfolio it is copied from.

Actual results

Product not deleted.

@eamonnfaherty
Copy link
Contributor

Thanks for taking the time to raise this @RobReus

This is a gap in functionality at the moment. Sorry for this.

There is something you can do - you can set the products to be inactive using factory. When you run the pipeline that change will propagate to the spokes. When you delete the hub product the spokes will be orphaned but will remain inactive and so new provisioned products cannot be created.

@eamonnfaherty eamonnfaherty added the enhancement New feature or request label May 27, 2020
@RobReus
Copy link
Contributor Author

RobReus commented May 27, 2020

@eamonnfaherty I was afraid of this. You mean set the versions to inactive/terminated so that the product in itself is useless as it contains no deployable templates anymore? That is a possibility to mitigate this issue for now indeed.

Is it feasible to have a check which compares the imported/shared portfolio with the local one, and creates tasks to delete any local products which are not found in the imported portfolio? If so, I can maybe spend some time on that when I have some time to kill.

@eamonnfaherty
Copy link
Contributor

You are correct in that you would make the product useless.

I would be happy to accept any other contributions you can make. I dont mind having a quick chat about getting started with developing for the framework.

@eamonnfaherty eamonnfaherty changed the title Products not deleted Copied (spoke) products are not deleted when the hub product is May 27, 2020
@RobReus
Copy link
Contributor Author

RobReus commented May 28, 2020

@eamonnfaherty tried contacting you on the AWS Developers slack but guess you're not monitoring that one. It might be handy to have a quick chat indeed, feel free to contact me on slack anytime.

@jmflynn81
Copy link

Hi @eamonnfaherty, we are also seeing this issue. Would be happy to jump on a call when you have a minute and discuss this through and what options we may have going forward.

@myshauno
Copy link

I'm experiencing this issue with spoke-local-portfolios which we use for service offerings, the local copy of the portfolio doesn't align with the imported version which is consistently updated to align with our central account offerings where Factory/Puppet infra is placed.

Is there any way currently to terminate products like this or is it still worth just de-activating all product versions manually instead?

@vijayrajarajana
Copy link

Hi myshauno,
I am too facing the same issue. Spoke local portfolios is not updating the products with the latest versions. I even tried to delete the spoke local portfolio data from the manifest file and also tried with "Status: terminated" in spoke local portfolio which is also not deleting the products from the service catalog products.

Hi eamonnfaherty,

Can you please help us with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants