Rename worker clusters to tags #104223

Manually merged
Sybren A. Stüvel merged 8 commits from Evelinealy/flamenco:worker-tag-rename into main 2023-07-10 11:13:35 +02:00
Collaborator

As it was decided that the name "tags" would be better for the clarity of the feature, all files and code named "cluster" or "worker cluster" have been removed and replaced with "tag" and "worker tag". This is only a name change, no other features were touched.

This fixes part of #104204; there's more to implement though.


To convert the database from 'clusters' to 'tags', run the following two SQL statements:

insert into worker_tags
    (id, created_at, updated_at, uuid, name, description)
  select id, created_at, updated_at, uuid, name, description
  from worker_clusters;

insert into worker_tag_membership (worker_tag_id, worker_id)
  select worker_cluster_id, worker_id from worker_cluster_membership;
As it was decided that the name "tags" would be better for the clarity of the feature, all files and code named "cluster" or "worker cluster" have been removed and replaced with "tag" and "worker tag". This is only a name change, no other features were touched. This fixes part of #104204; there's more to implement though. ---------- To convert the database from 'clusters' to 'tags', run the following two SQL statements: ```sql insert into worker_tags (id, created_at, updated_at, uuid, name, description) select id, created_at, updated_at, uuid, name, description from worker_clusters; insert into worker_tag_membership (worker_tag_id, worker_id) select worker_cluster_id, worker_id from worker_cluster_membership; ```
Eveline Anderson added 4 commits 2023-06-24 20:15:21 +02:00
85a4bef2e2 OAPI: change 'worker cluster' to 'worker tag'
As requested by @fsiddi, see
#104204

Just a rename of 'worker cluster' to 'worker tag', and 'cluster' to 'tag'.

No functional changes, although the operation IDs and endpoint URLs do
change.
35c9ef77f7 Rename 'Worker Clusters' to 'Worker Tags'
For clarity the 'worker clusters' were renamed to 'worker tags'.

See #104204

No functional changes.
c8dae9906d Little typo fix
Just a fix for a little mistake in the separation of desired & undesired
changes (i.e. removing the unrelated auto-formatting).
Eveline Anderson changed title from worker-tag-rename to Fix #104204: Rename worker clusters to tags 2023-06-24 20:16:22 +02:00
Sybren A. Stüvel changed title from Fix #104204: Rename worker clusters to tags to Rename worker clusters to tags 2023-06-27 09:58:37 +02:00

Please do test that the functionality still works -- the unit tests only cover part of it.

When assigning a tag to a worker, I'm getting this JS error:

index.036c806e.js:1 ReferenceError: WorkerTagChangeRequest is not defined
    at Proxy.toggleWorkerTag (WorkersView.43a4c15f.js:2:455)
    at onSwitchToggle (WorkersView.43a4c15f.js:2:4129)
    at ir (index.036c806e.js:1:13937)
    at Tt (index.036c806e.js:1:14015)
    at kd (index.036c806e.js:1:16038)
    at s.onChange.r.<computed>.r.<computed> (WorkersView.43a4c15f.js:1:1192)
    at ir (index.036c806e.js:1:13937)
    at Tt (index.036c806e.js:1:14015)
    at HTMLInputElement.r (index.036c806e.js:1:51796)

To get a better one, you can use the frontend dev server (cd web/app; yarn run IIRC, but the readme/docs will have more on this) to get non-minified JS to help debug this.

Please do test that the functionality still works -- the unit tests only cover part of it. When assigning a tag to a worker, I'm getting this JS error: ``` index.036c806e.js:1 ReferenceError: WorkerTagChangeRequest is not defined at Proxy.toggleWorkerTag (WorkersView.43a4c15f.js:2:455) at onSwitchToggle (WorkersView.43a4c15f.js:2:4129) at ir (index.036c806e.js:1:13937) at Tt (index.036c806e.js:1:14015) at kd (index.036c806e.js:1:16038) at s.onChange.r.<computed>.r.<computed> (WorkersView.43a4c15f.js:1:1192) at ir (index.036c806e.js:1:13937) at Tt (index.036c806e.js:1:14015) at HTMLInputElement.r (index.036c806e.js:1:51796) ``` To get a better one, you can use the frontend dev server (`cd web/app; yarn run` IIRC, but the readme/docs will have more on this) to get non-minified JS to help debug this.
Sybren A. Stüvel requested review from Sybren A. Stüvel 2023-07-03 10:41:15 +02:00
Eveline Anderson changed title from Rename worker clusters to tags to WIP: Rename worker clusters to tags 2023-07-04 18:25:44 +02:00
Eveline Anderson changed title from WIP: Rename worker clusters to tags to Rename worker clusters to tags 2023-07-06 18:37:48 +02:00
Eveline Anderson added 3 commits 2023-07-06 22:25:25 +02:00
Eveline Anderson added 1 commit 2023-07-06 22:38:50 +02:00
Author
Collaborator

Apologies for the redundant commits. There was a bit of an issue I was trying to work around with the git errors. Anyways, I fix the WorkerDetails.vue file, so please let me know if this changes the bug on your end. Thank you!

Apologies for the redundant commits. There was a bit of an issue I was trying to work around with the git errors. Anyways, I fix the WorkerDetails.vue file, so please let me know if this changes the bug on your end. Thank you!
Author
Collaborator

There is one more area in which clusters is mentioned, and that is the 273-0d96b20d.chunk.min.js file in the flamenco/web/project-website/themes/hugo-geekdoc/static/js. Is that a simple generated file? I can edit that one as well, but I'm not sure if it will be changed anyways because of it being generated.

There is one more area in which clusters is mentioned, and that is the `273-0d96b20d.chunk.min.js` file in the `flamenco/web/project-website/themes/hugo-geekdoc/static/js`. Is that a simple generated file? I can edit that one as well, but I'm not sure if it will be changed anyways because of it being generated.

Apologies for the redundant commits.

The individual commits in a PR are the last thing I'd look at. It's just a side-effect of an actual human doing stuff. Commits can be squashed, torn apart, played with. And that's one of the last things to look into before actually landing the PR.

There is one more area in which clusters is mentioned, and that is the 273-0d96b20d.chunk.min.js file in the flamenco/web/project-website/themes/hugo-geekdoc/static/js. Is that a simple generated file? I can edit that one as well, but I'm not sure if it will be changed anyways because of it being generated.

That's 3rd party code of Geekdoc (our Hugo theme), it shouldn't be altered for this.

> Apologies for the redundant commits. The individual commits in a PR are the last thing I'd look at. It's just a side-effect of an actual human doing stuff. Commits can be squashed, torn apart, played with. And that's one of the last things to look into before actually landing the PR. > There is one more area in which clusters is mentioned, and that is the `273-0d96b20d.chunk.min.js` file in the `flamenco/web/project-website/themes/hugo-geekdoc/static/js`. Is that a simple generated file? I can edit that one as well, but I'm not sure if it will be changed anyways because of it being generated. That's 3rd party code of Geekdoc (our Hugo theme), it shouldn't be altered for this.
Sybren A. Stüvel requested changes 2023-07-07 15:09:29 +02:00
Sybren A. Stüvel left a comment
Owner

🥳 that last JS error is fixed indeed, and I can confirm that everything seems to be working fine now.

There's just two things left:

  • This commit undoes some of the changes on origin/main. I've had this before, it can because by accidentally using main instead of origin/main when merging. No big deal, we can remove those changes before landing the PR. I've left a note at the places where this happened.
  • The auto-formatter changed a whole bunch of things again, which IIRC I reverted back at some point. Now it's your turn to do this work ;-)
🥳 that last JS error is fixed indeed, and I can confirm that everything seems to be working fine now. There's just two things left: - This commit undoes some of the changes on `origin/main`. I've had this before, it can because by accidentally using `main` instead of `origin/main` when merging. No big deal, we can remove those changes before landing the PR. I've left a note at the places where this happened. - The auto-formatter changed a whole bunch of things again, which IIRC I reverted back at some point. Now it's your turn to do this work ;-)
CHANGELOG.md Outdated
@ -13,3 +13,3 @@
- Add support for finding the top-level 'project' directory. When submitting files to Flamenco, the add-on will try to retain the directory structure of your Blender project as precisely as possible. This new feature allows the add-on to find the top-level directory of your project by finding a `.blender_project`, `.git`, or `.subversion` directory. This can be configured in the add-on preferences.
- Worker status is remembered when they sign off, so that workers when they come back online do so to the same state ([#99549](https://projects.blender.org/studio/flamenco/issues/99549)).
- Nicer version display for non-release builds. Instead of `3.3-alpha0-v3.2-76-gdd34d538`, show `3.3-alpha0 (v3.2-76-gdd34d538)`.

Be sure to merge origin/main carefully. It seems that certain changes there got reverted. I can also help with this if you want.

Be sure to merge `origin/main` carefully. It seems that certain changes there got reverted. I can also help with this if you want.
@ -371,3 +371,3 @@
func logURLs(urls []url.URL) {
log.Info().Int("count", len(urls)).Msg("possible URLs at which to reach Flamenco Manager")
log.Info().Int("count", len(urls)).Msg("possble URL at which to reach Flamenco Manager")

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
go.mod Outdated
@ -14,3 +14,2 @@
github.com/getkin/kin-openapi v0.88.0
github.com/glebarez/go-sqlite v1.21.1
github.com/glebarez/sqlite v1.8.0
github.com/glebarez/go-sqlite v1.17.3

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
@ -45,3 +45,3 @@
return ApplicationVersion
default:
return fmt.Sprintf("%s (%s)", ApplicationVersion, ApplicationGitHash)
return fmt.Sprintf("%s-%s", ApplicationVersion, ApplicationGitHash)

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
@ -26,7 +26,6 @@ func (f *Flamenco) GetVersion(e echo.Context) error {
Version: appinfo.ExtendedVersion(),
Shortversion: appinfo.ApplicationVersion,
Name: appinfo.ApplicationName,
Git: appinfo.ApplicationGitHash,

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
@ -82,3 +82,3 @@
defer cancel()
startTime := time.Date(2023, time.February, 7, 15, 0, 0, 0, time.UTC)
startTime := time.Date(2023, time.February, 7, 15, 0, 0, 0, time.Local)

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
@ -36,3 +28,1 @@
// sqlErr, ok := err.(*sqlite.Error)
// return ok && sqlErr.Code() == sqlite_lib.SQLITE_BUSY
return strings.Contains(err.Error(), "SQLITE_BUSY")
sqlErr, ok := err.(*sqlite.Error)

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
@ -91,3 +91,3 @@
// file-management
"move-directory": ce.cmdMoveDirectory,
"copy-file": ce.cmdCopyFile,
"copy-file": ce.cmdCopyFile,

This is a formatting change that should indeed be applied, but shouldn't be part of this PR. Same for the other formatting changes in the command_...go files.

This is a formatting change that should indeed be applied, but shouldn't be part of this PR. Same for the other formatting changes in the `command_...go` files.
@ -1340,3 +1337,1 @@
Version of this Manager, meant for human consumption. For release
builds it is the same as `shortversion`, for other builds it also
includes the `git` version info.
"version": { type: string }

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
@ -5,3 +5,3 @@
<dl>
<dt class="field-id">ID</dt>
<dd><span @click="copyElementText" class="click-to-copy">{{ workerData.id }}</span></dd>
<dd>

These formatting changes don't relate to this PR, so they shouldn't be in here.

These formatting changes don't relate to this PR, so they shouldn't be in here.
@ -138,3 +188,2 @@
<script>
import { useNotifs } from '@/stores/notifications'
import { useWorkers } from '@/stores/workers'
import { useNotifs } from "@/stores/notifications";

These are also formatting changes that shouldn't be in here.

These are also formatting changes that shouldn't be in here.
@ -8,9 +8,6 @@ next to the `flamenco-manager` executable. The previous chapters
([Shared Storage][storage] and [Variables][variables]) also described parts of
that configuration file.
[storage]: {{< ref "shared-storage" >}}

This is another change in main that got reverted here.

This is another change in `main` that got reverted here.
Eveline Anderson force-pushed worker-tag-rename from ab06eb4d31 to 9ec341ab39 2023-07-07 19:17:56 +02:00 Compare
Author
Collaborator

I generated the code to make sure it came up okay, and used git reset + forced the push. I'm really hoping this works, please let me know!

I generated the code to make sure it came up okay, and used git reset + forced the push. I'm really hoping this works, please let me know!

Please take a look at the Files Changed tab. That shows that the generated Python files have been deleted. I'll regenerate them (with make generate) before testing the PR.

Please take a look at the [Files Changed](https://projects.blender.org/studio/flamenco/pulls/104223/files) tab. That shows that the generated Python files have been deleted. I'll regenerate them (with `make generate`) before testing the PR.
Sybren A. Stüvel added 1 commit 2023-07-10 10:57:18 +02:00
Sybren A. Stüvel added 1 commit 2023-07-10 10:58:55 +02:00

It works, well done :)

I'll land this PR in main, it'll automatically delete your worker-tag-rename branch as well. To see that branch removal locally on your machine as well, do git fetch origin --prune.

It works, well done :) I'll land this PR in `main`, it'll automatically delete your `worker-tag-rename` branch as well. To see that branch removal locally on your machine as well, do `git fetch origin --prune`.
Sybren A. Stüvel approved these changes 2023-07-10 11:03:27 +02:00
Sybren A. Stüvel manually merged commit 830c3fe794 into main 2023-07-10 11:13:35 +02:00
Sign in to join this conversation.
No description provided.