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

batches: issue executor warning when outdated#40916

Merged
BolajiOlajide merged 42 commits into
mainfrom
bo/outdated-executor-warning
Sep 22, 2022
Merged

batches: issue executor warning when outdated#40916
BolajiOlajide merged 42 commits into
mainfrom
bo/outdated-executor-warning

Conversation

@BolajiOlajide

@BolajiOlajide BolajiOlajide commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

Closes #27570

Test plan

  • Confirm warning only shows up on active executors that have a version lower than the sourcegraph version (either using semver versioning or timestamps).

CleanShot 2022-08-26 at 16 02 13@2x

App preview:

Check out the client app preview documentation to learn more.

@BolajiOlajide BolajiOlajide added the batch-changes Issues related to Batch Changes label Aug 26, 2022
@BolajiOlajide BolajiOlajide self-assigned this Aug 26, 2022
@cla-bot cla-bot Bot added the cla-signed label Aug 26, 2022
@BolajiOlajide

Copy link
Copy Markdown
Contributor Author

@danielmarquespt Is the wording for this alert okay?
CleanShot 2022-08-26 at 16 02 13@2x

@BolajiOlajide BolajiOlajide marked this pull request as ready for review August 26, 2022 15:03
@BolajiOlajide BolajiOlajide requested a review from a team August 26, 2022 15:03
@sourcegraph-bot

sourcegraph-bot commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff c7c01c8...1e747c2.

Notify File(s)
@courier-new client/web/src/enterprise/batches/batch-spec/batch-spec.mock.ts
client/web/src/enterprise/batches/batch-spec/execute/backend.ts
@efritz client/web/src/enterprise/executors/ExecutorsListPage.tsx
client/web/src/enterprise/executors/useExecutors.tsx
@eseliger client/web/src/enterprise/batches/batch-spec/batch-spec.mock.ts
client/web/src/enterprise/batches/batch-spec/execute/backend.ts
client/web/src/enterprise/executors/ExecutorsListPage.tsx
client/web/src/enterprise/executors/useExecutors.tsx

@danielmarquespt

danielmarquespt commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

@danielmarquespt Is the wording for this alert okay?
CleanShot 2022-08-26 at 16 02 13@2x

@BolajiOlajide Are able to tell the user which version would be a compatible version?

@BolajiOlajide

Copy link
Copy Markdown
Contributor Author

@danielmarquespt Is the wording for this alert okay?
CleanShot 2022-08-26 at 16 02 13@2x

@BolajiOlajide Are able to tell the user which version would be a compatible version?

Yes.

@danielmarquespt

Copy link
Copy Markdown
Contributor

@danielmarquespt Is the wording for this alert okay?
CleanShot 2022-08-26 at 16 02 13@2x

@BolajiOlajide Are able to tell the user which version would be a compatible version?

Yes.

Then I would suggest something like "Please upgrade this executor to a version compatible with your Sourcegraph installation (X.X or higher)"

Comment thread client/web/src/enterprise/batches/batch-spec/execute/TimelineModal.tsx Outdated
Comment thread client/web/src/enterprise/executors/utils.ts Outdated
Comment thread client/web/src/enterprise/executors/ExecutorsListPage.tsx Outdated
Comment thread cmd/frontend/graphqlbackend/schema.graphql Outdated
Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated
Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated
@BolajiOlajide BolajiOlajide force-pushed the bo/outdated-executor-warning branch from 7750c5d to 69f4358 Compare September 5, 2022 17:14
Comment thread client/web/src/enterprise/executors/ExecutorsListPage.tsx Outdated
Comment thread client/web/src/enterprise/executors/ExecutorsListPage.tsx Outdated
Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated
Comment thread CHANGELOG.md Outdated
Comment thread client/web/src/enterprise/executors/ExecutorsListPage.tsx Outdated
Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated
Comment thread cmd/frontend/graphqlbackend/schema.graphql Outdated
@BolajiOlajide BolajiOlajide force-pushed the bo/outdated-executor-warning branch from 15ebc58 to 4f3daf4 Compare September 9, 2022 13:09
Comment thread cmd/frontend/graphqlbackend/schema.graphql Outdated
Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated
@BolajiOlajide BolajiOlajide force-pushed the bo/outdated-executor-warning branch from 87b2c9a to a93c614 Compare September 13, 2022 13:39
Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated

@eseliger eseliger left a comment

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.

sorry for the slow review! Added a few questions inline

Comment thread internal/services/executors/transport/graphql/types.go Outdated
Comment thread internal/services/executors/transport/graphql/types.go Outdated
Comment thread internal/services/executors/transport/graphql/types.go Outdated
Comment thread cmd/frontend/graphqlbackend/schema.graphql Outdated
Comment thread cmd/frontend/graphqlbackend/schema.graphql
Comment thread client/web/src/enterprise/executors/ExecutorsListPage.tsx Outdated
Comment thread client/web/src/enterprise/executors/ExecutorsListPage.tsx Outdated
Comment thread client/web/src/enterprise/executors/ExecutorsListPage.tsx Outdated
@BolajiOlajide BolajiOlajide force-pushed the bo/outdated-executor-warning branch 2 times, most recently from 3479219 to 7d6418c Compare September 21, 2022 23:51

@LawnGnome LawnGnome left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated
Comment thread cmd/frontend/graphqlbackend/schema.graphql Outdated
Comment thread internal/services/executors/transport/graphql/executor_resolver.go Outdated

@eseliger eseliger left a comment

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.

Pending Adams comments, LGTM!

Comment thread client/shared/src/commandPalette/CommandList.tsx Outdated
Comment thread internal/services/executors/transport/graphql/types.go Outdated
Comment thread client/web/src/site-admin/analytics/components/AnalyticsPageTitle.tsx Outdated
Comment thread client/shared/src/commandPalette/CommandList.tsx Outdated
Comment thread client/web/src/org/members/SearchUserAutocomplete.tsx Outdated
Comment thread client/shared/src/commandPalette/CommandList.tsx Outdated
BolajiOlajide and others added 25 commits September 22, 2022 19:21
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
…r.go

Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
Co-authored-by: Erik Seliger <erikseliger@me.com>
Co-authored-by: Erik Seliger <erikseliger@me.com>
Co-authored-by: Erik Seliger <erikseliger@me.com>
Co-authored-by: Erik Seliger <erikseliger@me.com>
Co-authored-by: Erik Seliger <erikseliger@me.com>
Co-authored-by: Erik Seliger <erikseliger@me.com>
@BolajiOlajide BolajiOlajide force-pushed the bo/outdated-executor-warning branch from 3723bb2 to 167614a Compare September 22, 2022 18:25
@BolajiOlajide BolajiOlajide merged commit 7c35851 into main Sep 22, 2022
@BolajiOlajide BolajiOlajide deleted the bo/outdated-executor-warning branch September 22, 2022 18:57
sashaostrikov pushed a commit that referenced this pull request Sep 29, 2022
* display warning for outdated executors

* format

* format error message

* move method for checking executor version to its own module

* prettier

* update comment

* update warning text

* prettier

* prettier

* display spinner when fetching sourcegraph version

* move the logic to backend

* move logic to backend

* rewrite implementation

* add tests for resolver

* Update cmd/frontend/graphqlbackend/schema.graphql

Co-authored-by: Erik Seliger <erikseliger@me.com>

* update changelog

* appropriately compare dates

* allow executor version to be one minor version behind

* fix ts build error

* Update CHANGELOG.md

Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>

* Update internal/services/executors/transport/graphql/executor_resolver.go

Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>

* clean up executor resolver

* add upgrade executors link

* rewrite logic for calculating executor compatibility

* update UI

* use /help instead of https://docs.sourcegraph.com

* rename TOONEW to VERSION_AHEAD

* Update executor_resolver.go

* Update cmd/frontend/graphqlbackend/schema.graphql

Co-authored-by: Erik Seliger <erikseliger@me.com>

* Update cmd/frontend/graphqlbackend/schema.graphql

Co-authored-by: Erik Seliger <erikseliger@me.com>

* Update client/web/src/enterprise/executors/ExecutorsListPage.tsx

Co-authored-by: Erik Seliger <erikseliger@me.com>

* Update cmd/frontend/graphqlbackend/schema.graphql

Co-authored-by: Erik Seliger <erikseliger@me.com>

* Update cmd/frontend/graphqlbackend/schema.graphql

Co-authored-by: Erik Seliger <erikseliger@me.com>

* Update cmd/frontend/graphqlbackend/schema.graphql

Co-authored-by: Erik Seliger <erikseliger@me.com>

* cleanup

* more cleanup

* fix ts build error

* handle more edge cases

* update changelog

* implement feedback

* update schema docstring

* update name in test

Co-authored-by: Erik Seliger <erikseliger@me.com>
Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
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 cla-signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

executors: Warn when outdated

7 participants