Skip to content

Validate: add ability to check if code insights works on an instance#912

Merged
mucles merged 4 commits into
mainfrom
mucles/validate-check-insights
Jan 9, 2023
Merged

Validate: add ability to check if code insights works on an instance#912
mucles merged 4 commits into
mainfrom
mucles/validate-check-insights

Conversation

@mucles

@mucles mucles commented Jan 9, 2023

Copy link
Copy Markdown
Contributor

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
Comment thread CHANGELOG.md Outdated
Co-authored-by: Bolaji Olajide <25608335+BolajiOlajide@users.noreply.github.com>
@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

leonore commented Jan 10, 2023

Copy link
Copy Markdown
Contributor

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 <25608335+BolajiOlajide@users.noreply.github.com>

Co-authored-by: Bolaji Olajide <25608335+BolajiOlajide@users.noreply.github.com>
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

4 participants