-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Mesh page to OSSMC #309
Conversation
Kiali frontend source originated from: * git ref: master * git commit: d458c06342458637ec3cdac943b01be663b0de35 * GitHub URL: https://github.com/kiali/kiali/tree/d458c06342458637ec3cdac943b01be663b0de35/frontend/src Signed-off-by: Fernando Hoyos <fhoyosle@redhat.com>
|
||
const metadata: ConsolePluginBuildMetadata = { | ||
name: 'ossmconsole', | ||
version: '1.85.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During our build process, we have update this version string. Because it is now in a new file, we should make sure our build process doesn't break. I'm not sure exactly where we do this - it is either in the github workflow or in some Makefile. I will look to try to find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the place: https://github.com/kiali/openshift-servicemesh-plugin/blob/main/.github/workflows/release.yaml#L209
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we still need to change "version:" here in package.json (there is one at the top of the file)... but now we need to do this version update in this plugihn-metadata.ts file, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want something similar to this:
jq -r ".version |= \"${RELEASE_VERSION:1}\" plugin/package.json > plugin/package.json.tmp
mv plugin/package.json.tmp plugin/package.json
jq -r ".version |= \"${RELEASE_VERSION:1}\" plugin/plugin-metadata.json > plugin/plugin-metadata.json.tmp
mv plugin/plugin-metadata.json.tmp plugin/plugin-metadata.json
But that probably isn't 100% correct because now the plugin version is inside a javascript file, not a json file so the "jq" tool likely will not work. So for that second set of commands we will need to use something like "sed" rather than "jq".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see ferhoyos#6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a PR to this PR so it updates the version strings properly in all the files where version string is now found (there is now a third file - plugin-metadata.ts - where version has to be updated by the release action).
See ferhoyos#6
You can test that the new script works by running it and checking the three files are correctly changed.
Try it with a snapshot version and non-snapshot version (the package.json and plugin-metadata.ts should not have -SNAPSHOT
in the version string - the script will strip it out. The Makefile will still show -SNAPSHOT in the version string).
hack/update-version-string.sh v1.2.3
should result in:
diff --git a/Makefile b/Makefile
-VERSION ?= v1.85.0-SNAPSHOT
+VERSION ?= v1.2.3
diff --git a/plugin/package.json b/plugin/package.json
- "version": "1.85.0",
+ "version": "1.2.3",
diff --git a/plugin/plugin-metadata.ts b/plugin/plugin-metadata.ts
- version: '1.85.0',
+ version: '1.2.3',
hack/update-version-string.sh v1.2.3-SNAPSHOT
should result in:
diff --git a/Makefile b/Makefile
-VERSION ?= v1.85.0-SNAPSHOT
+VERSION ?= v1.2.3-SNAPSHOT
diff --git a/plugin/package.json b/plugin/package.json
- "version": "1.85.0",
+ "version": "1.2.3",
diff --git a/plugin/plugin-metadata.ts b/plugin/plugin-metadata.ts
- version: '1.85.0',
+ version: '1.2.3',
* change the version in the new metadata ts file * release workflow action: change version strings properly
my changes were added. now I'll now run this all and test it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more changes needed for the release action so the new plugin-metadata.ts file gets updated in the release PRs that get generated.
Co-authored-by: John Mazzitelli <mazz@redhat.com>
Describe the change
Add Mesh page to OSSMC
Bonus: Extract console plugin metadata into separate file, as indicated here: https://github.com/openshift/console/blob/master/frontend/packages/console-dynamic-plugin-sdk/README.md#plugin-metadata
Steps to test the PR
Service Mesh
/Mesh
navigation menuAutomation testing
Cypress test to check that mesh page has been loaded correctly (detailed tests are included in Kiali repo)
Issue reference
Closes #308