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

Export to Existing Project #272

Closed
sammachin opened this issue Feb 9, 2022 · 8 comments
Closed

Export to Existing Project #272

sammachin opened this issue Feb 9, 2022 · 8 comments
Assignees
Labels
size:M - 3 Sizing estimation point story A user-oriented description of a feature
Milestone

Comments

@sammachin
Copy link
Contributor

sammachin commented Feb 9, 2022

Epic

#268

Description

As a: Owner

I want to: Export a project to update an existing project
Any components in the export should replace the current ones in the project, anything not in the export should not be modified

So that: I can deploy my changes from Dev to Production

Acceptance Criteria

@sammachin sammachin added the story A user-oriented description of a feature label Feb 9, 2022
@sammachin sammachin modified the milestone: 0.5 Mar 30, 2022
@knolleary
Copy link
Member

Much of #271 applies here too - the goal is for a consistent UX between the two stories.

  1. Under Danger section of project settings, add a 'Copy to existing project' option.
  2. Opens a dialog - user is shown a list of projects in the current team
    (as with Duplicate Project #271, I propose restricting this to 'within the same team' for MVP - otherwise we also have to think through the security/policy questions that come up with copying outside of the team boundary)
  3. User selects team, then show the list of options to copy over - Select Project Components to Export #270

Runtime API

The PUT /api/v1/project/:id endpoint is the existing 'update a project' endpoint. This feature should add a mode to that triggers this behaviour.

The payload should include an object consistent with that proposed in #271

{
 sourceProject: {
    id: <source project id>
    options: <copy options>
 }
}

Note this property cannot be mixed with the other options.

As per comment on limiting to the same team (for now), the api should ensure the target project is in the same team as source project.

@knolleary knolleary added the size:M - 3 Sizing estimation point label Apr 6, 2022
@sammachin
Copy link
Contributor Author

Yes all within the same team for now.

Where a component is selected to be copied over it will overwrite any existing data for example if Source project has Env vars A B & C and target project has Env D, E then this action will end up with the target project only having A, B, C.

@knolleary
Copy link
Member

Where a component is selected to be copied over it will overwrite any existing data for example if Source project has Env vars A B & C and target project has Env D, E then this action will end up with the target project only having A, B, C.

Correct - the assumed behaviour would be to overwriting rather than merging.

If it becomes evident there is a use case for merging some particular settings, we can address as a future story.

@sammachin sammachin added this to the 0.5 milestone Apr 8, 2022
@hardillb hardillb self-assigned this Apr 21, 2022
@hardillb
Copy link
Contributor

hardillb commented May 3, 2022

Should credentials be copied even if the flow isn't in this situation?

Duplicating and exporting both currently only copy creds if the flow is also copied, but I can see a case for just copying over the creds in this usecase.

@hardillb
Copy link
Contributor

hardillb commented May 5, 2022

@knolleary & @sammachin Should the export also change the template and stack of the target project?

@sammachin
Copy link
Contributor Author

Stack should stay as it is on the target project, for example you might have a "dev" project thats on a lighter stack than your production.

Template should replace the target I think? In most use cases I would expect both projects to be using the same template anyway

@knolleary
Copy link
Member

Stack - stays the same
Template - gets updated

@knolleary
Copy link
Member

Delivered in 0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M - 3 Sizing estimation point story A user-oriented description of a feature
Projects
Archived in project
Development

No branches or pull requests

3 participants