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

Create simple page for lockfile index#39427

Merged
mrnugget merged 5 commits into
mainfrom
mrn/lockfile-index-page
Jul 27, 2022
Merged

Create simple page for lockfile index#39427
mrnugget merged 5 commits into
mainfrom
mrn/lockfile-index-page

Conversation

@mrnugget

@mrnugget mrnugget commented Jul 26, 2022

Copy link
Copy Markdown
Contributor

This adds a detail page for a single lockfile index and a mutation to delete them.

Of course there should/will be more information on that page, but baby steps.

Test plan

  • Manual testing
screenshot_2022-07-26_16.56.04.mp4

App preview:

Check out the client app preview documentation to learn more.

@cla-bot cla-bot Bot added the cla-signed label Jul 26, 2022
@mrnugget mrnugget marked this pull request as ready for review July 26, 2022 15:01
@mrnugget mrnugget requested a review from eseliger July 26, 2022 15:01
@sourcegraph-bot

sourcegraph-bot commented Jul 26, 2022

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff fea76e9...eafb5b9.

Notify File(s)
@Strum355 internal/codeintel/dependencies/internal/store/store.go
internal/codeintel/dependencies/internal/store/store_test.go
internal/codeintel/dependencies/mocks_test.go
internal/codeintel/dependencies/service.go
internal/codeintel/dependencies/transport/graphql/resolver.go
@efritz client/web/src/enterprise/codeintel/lockfiles/components/CodeIntelLockfileIndexNode.module.scss
client/web/src/enterprise/codeintel/lockfiles/components/CodeIntelLockfileIndexNode.tsx
client/web/src/enterprise/codeintel/lockfiles/pages/CodeIntelLockfilePage.tsx
client/web/src/enterprise/codeintel/lockfiles/pages/CodeIntelLockfilesPage.module.scss
client/web/src/enterprise/codeintel/lockfiles/pages/CodeIntelLockfilesPage.tsx
client/web/src/enterprise/codeintel/lockfiles/pages/queries.ts
internal/codeintel/dependencies/internal/store/store.go
internal/codeintel/dependencies/internal/store/store_test.go
internal/codeintel/dependencies/mocks_test.go
internal/codeintel/dependencies/service.go
internal/codeintel/dependencies/transport/graphql/resolver.go

Comment on lines +539 to +541
func (s *Service) DeleteLockfileIndexByID(ctx context.Context, id int) error {
return s.dependenciesStore.DeleteLockfileIndexByID(ctx, id)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

RETURNING repository_id, commit_bytea, lockfile
`

const deleteLockfileReferencesQuery = `

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there no overlaps in these three columns ever, ie. is this guaranteed to never be deleting any other lockfiles data?
If so, could this be a composite foreign key, by which we would also get the cascading delete done by the DB layer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there's a unique index on these three.

If so, could this be a composite foreign key, by which we would also get the cascading delete done by the DB layer.

Good idea!

Comment thread internal/codeintel/dependencies/internal/store/store.go Outdated
@mrnugget mrnugget merged commit 0bc0766 into main Jul 27, 2022
@mrnugget mrnugget deleted the mrn/lockfile-index-page branch July 27, 2022 08:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants