Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Backend: New campaign flow #10985

Closed
28 tasks done
eseliger opened this issue May 26, 2020 · 3 comments
Closed
28 tasks done

Backend: New campaign flow #10985

eseliger opened this issue May 26, 2020 · 3 comments
Assignees
Labels
batch-changes Issues related to Batch Changes estimate/12d planned/3.17 planned/3.18 planned/3.19 RFC-157 Tickets related to RFC 157 - Campaigns authorization model
Milestone

Comments

@eseliger
Copy link
Member

eseliger commented May 26, 2020

Docs/Schema in PR #10921

STATUS: WIP pull request is https://github.com/sourcegraph/sourcegraph/pull/11675 and the tasks below as a WIP until we've done 3.19 planning.

Conceptual/Docs/GraphQL Schema

The PR in which these higher-level changes should be proposed/made/discussed is https://github.com/sourcegraph/sourcegraph/pull/10921

  • Schema for tracking existing changesets in campaign-spec.yml

Implementation Backend

The list below is not complete, but a rough overview of what has been done and needs to be done:

  • Pull in the GraphQL schema from https://github.com/sourcegraph/sourcegraph/pull/10921 as a skeleton (with only "TODOs" as implementation)
  • Remove GraphQL resolvers and majority of campaigns.Service methods that were only used in old workflow (I decided to keep the type definitions and database tables for Patch/PatchSet/ChangesetJob around, even though I anticipate that we will need to remove them)
  • Add campaign_specs & changeset_specs database tables, Go type definitions and methods in campaigns.Store
  • Add CampaignSpecByID query and CampaignSpec resolver (some methods still have TODOs)
  • Add ChangesetSpecByID query and ChangesetSpec resolver (some methods still have TODOs)
  • Implement createChangesetSpec mutation
  • Implement createCampaignSpec mutation
  • Implement applyCampaignSpec
  • Implement moveCampaign mutation
  • Update the GraphQL API to reflect newest state in update docs for new campaign flow #10921
  • Move fields from CampaignSpec.Spec to ChangesetSpec.Description after newest updates to update docs for new campaign flow #10921
  • Validate CampaignSpec in (*Service).CreateCampaignSpec (depends on schema, see above)
  • Validate ChangesetSpec in (*Service).CreateChangesetSpec (depends on schema, see above)
  • Allow on: (unquoted!) in YAML definition of CampaignSpec
  • Expire {Campaign,Changeset}Specs
    • Return proper value in {Campaign,Changeset} Spec.ExpiresAt
  • Implement ChangesetSpec/CampaignSpec resolvers so that CampaignSpec.PreviewURL works
  • In createCampaignSpec check the user has access to the namespace it's creating the spec for.
  • In moveCampaign check the user has access to the new namespace.
  • Implement Changeset.Status API
    • Add new state field to Changeset
    • Create "pending"/"unpublished" changesets when applying a CampaignSpec
      • Add internal state field to changesets
      • Add changeset_spec_id to changesets
    • ... many more things I have in a separate list
  • Implement the Reconciler that picks up unreconciled campaigns and creates the desired state
  • Implement tracking/importing of manual changesets
@eseliger eseliger added campaigns estimate/5d planned/3.17 batch-changes Issues related to Batch Changes RFC-157 Tickets related to RFC 157 - Campaigns authorization model labels May 26, 2020
@eseliger eseliger added this to the 3.17 milestone May 26, 2020
@uwedeportivo
Copy link
Contributor

Dear all,

This is your release captain speaking. 🚂🚂🚂

Branch cut for the 3.17 release is scheduled for tomorrow.

Is this issue / PR going to make it in time? Please change the milestone accordingly.
When in doubt, reach out!

Thank you

@mrnugget mrnugget modified the milestones: 3.17, 3.18 Jun 16, 2020
@mrnugget mrnugget changed the title WIP: Backend: Inverted campaign creation workflow WIP: Backend: New campaign flow Jun 18, 2020
@mrnugget mrnugget changed the title WIP: Backend: New campaign flow Backend: New campaign flow Jun 23, 2020
@daxmc99
Copy link
Contributor

daxmc99 commented Jul 13, 2020

Dear all,

This is your release captain speaking. 🚂🚂🚂

Branch cut for the 3.18 release is scheduled for tomorrow.

Is this issue / PR going to make it in time? Please change the milestone accordingly.
When in doubt, reach out!

Thank you

@mrnugget
Copy link
Contributor

mrnugget commented Aug 4, 2020

I'm closing this after merging https://github.com/sourcegraph/sourcegraph/pull/12435. What's left to do in the backend has been extracted into separate tickets:

@mrnugget mrnugget closed this as completed Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
batch-changes Issues related to Batch Changes estimate/12d planned/3.17 planned/3.18 planned/3.19 RFC-157 Tickets related to RFC 157 - Campaigns authorization model
Projects
None yet
Development

No branches or pull requests

4 participants