Skip to content

Conversation

@mucles
Copy link
Contributor

@mucles mucles commented Jan 9, 2023

context: https://sourcegraph.slack.com/archives/C022SPMNR0W/p1672950729445719
Implementation Engineer will use script to verify if instance is configured correctly and can create basic code insights and batch changes

Test plan

locally tested using the scale test instance to create an insight
created yaml file

createInsight:
  title: "Javascript to Typescript migration" 
  dataSeries:
    [ {
        "query": "lang:javascript",
        "label": "javascript",
        "repositoryScope": [
            "github.com/sourcegraph/sourcegraph"
          ],
        "lineColor": "#6495ED",
        "timeScopeUnit": "MONTH",
        "timeScopeValue": 1
      },
     {
        "query": "lang:typescript",
        "label": "typescript",
        "lineColor": "#DE3163",
        "repositoryScope": [
            "github.com/sourcegraph/sourcegraph"
          ],
        "timeScopeUnit": "MONTH",
        "timeScopeValue": 1
      }
    ]

ran go run ./cmd/src validate validate.yaml

Screenshot 2023-01-06 at 4 13 16 PM

@mucles mucles requested review from scjohns and removed request for scjohns January 9, 2023 19:02
@mucles mucles changed the title Validate: add ability to check if code insights works on an iinstance Validate: add ability to check if code insights works on an instance Jan 9, 2023
Co-authored-by: Bolaji Olajide <[email protected]>
@mucles mucles merged commit f1ef4c8 into main Jan 9, 2023
@mucles mucles deleted the mucles/validate-check-insights branch January 9, 2023 20:53
@leonore
Copy link
Contributor

leonore commented Jan 10, 2023

hey, I'm not familiar with usage of src validate, but be aware if this is ran against an actual instance the code insight will live there and continuously backfill if you don't clean up- don't know if that might get confusing? just thought I'd comment :)

edit- this is how we clean up in our integration tests if you wanted to clean up after validation: https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/dev/gqltest/code_insights_test.go?L252-256

@mucles mucles linked an issue Jan 10, 2023 that may be closed by this pull request
scjohns pushed a commit that referenced this pull request Apr 24, 2023
…912)

* wip: add a validation check for being able to create insights

* validate: adjust required yaml inputs for creating an Insight

* validate: fixed missing common in json

* Update CHANGELOG.md

Co-authored-by: Bolaji Olajide <[email protected]>

Co-authored-by: Bolaji Olajide <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validate: add ability to create a basic insights chart

5 participants