Skip to content
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

FUSETOOLS2-2201: Testing with productized versions of Camel #1611

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

pospisilf
Copy link
Contributor

Pull Request informations

Rebase & Merge default requirements

  1. Green build for main branch
  2. Wait 24 hours after PR creation
  3. Green job for PR
  4. Approved PR

PR labels default process

  • READY_FOR_REVIEW → REVIEW_DONE → READY_FOR_MERGE

Tests

  • Are there Unit tests?
  • Are there Integration tests?
  • Do we need a new UI test?

PR workflow progress

  1. Tagged with relevant PR labels
  2. Green job for PR
  3. PR was created more than 24 hours ago or All committers approved it
  4. Green main branch build

@pospisilf pospisilf force-pushed the FUSETOOLS2-2201 branch 2 times, most recently from e5fd64f to d1dc467 Compare December 19, 2023 21:32
@pospisilf pospisilf changed the title FUSETOOLS2-2201 FUSETOOLS2-2201: Testing with productized versions of Camel Dec 19, 2023
@djelinek djelinek self-requested a review December 21, 2023 12:19
@pospisilf pospisilf force-pushed the FUSETOOLS2-2201 branch 6 times, most recently from 50ff61a to 79791ad Compare January 3, 2024 09:41
@pospisilf pospisilf requested review from apupier and djelinek and removed request for djelinek January 3, 2024 10:11
@pospisilf pospisilf marked this pull request as ready for review January 3, 2024 10:12
Copy link
Member

@apupier apupier left a comment

Choose a reason for hiding this comment

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

so cool to have tests with productized version
it would be convenient to have the camel version used visible in the log in some ways (console.log? the name of the tests ?) https://github.com/camel-tooling/camel-lsp-client-vscode/actions/runs/7395686841/job/20119333839?pr=1611 It will help to ensure that we are really testing with another version and when investigating a log to be sure which version is used.

.github/workflows/productized.yaml Outdated Show resolved Hide resolved
@pospisilf
Copy link
Contributor Author

so cool to have tests with productized version it would be convenient to have the camel version used visible in the log in some ways (console.log? the name of the tests ?) https://github.com/camel-tooling/camel-lsp-client-vscode/actions/runs/7395686841/job/20119333839?pr=1611 It will help to ensure that we are really testing with another version and when investigating a log to be sure which version is used.

The used version is included in the job's name for clarity, and there is a check implemented in '00_set.camel.version.test.ts'. This check ensures that the used version aligns with the required version, which is exported as an environmental variable.
There's not a way (if I know) to check, that server configuration was accepted and applied so all we can check is value inside settings.

Using console.log() could potentially reduce the readability of the test result log. Although I have the option to add a step in the 'productized.yaml' pipeline to echo the global variable value. What do you think?

@apupier
Copy link
Member

apupier commented Jan 8, 2024

so cool to have tests with productized version it would be convenient to have the camel version used visible in the log in some ways (console.log? the name of the tests ?) https://github.com/camel-tooling/camel-lsp-client-vscode/actions/runs/7395686841/job/20119333839?pr=1611 It will help to ensure that we are really testing with another version and when investigating a log to be sure which version is used.

The used version is included in the job's name for clarity, and there is a check implemented in '00_set.camel.version.test.ts'. This check ensures that the used version aligns with the required version, which is exported as an environmental variable. There's not a way (if I know) to check, that server configuration was accepted and applied so all we can check is value inside settings.

Using console.log() could potentially reduce the readability of the test result log. Although I have the option to add a step in the 'productized.yaml' pipeline to echo the global variable value. What do you think?

I would like to see it directly in the log when playing the test suite even locally. Consequently, another step in the GitHub Actions won't cover this use case.
Given that GitHub UI is cropping job names, I missed it. We can see it when going directly to the job itself as title. I will try to report issues to improve the GitHub UI.

Maybe providing a name of test for 00_set.camel.version.test.ts making it clear which version is used could be a good place.

@pospisilf pospisilf force-pushed the FUSETOOLS2-2201 branch 3 times, most recently from 6ba249a to 6401982 Compare January 8, 2024 18:55
@pospisilf
Copy link
Contributor Author

so cool to have tests with productized version it would be convenient to have the camel version used visible in the log in some ways (console.log? the name of the tests ?) https://github.com/camel-tooling/camel-lsp-client-vscode/actions/runs/7395686841/job/20119333839?pr=1611 It will help to ensure that we are really testing with another version and when investigating a log to be sure which version is used.

The used version is included in the job's name for clarity, and there is a check implemented in '00_set.camel.version.test.ts'. This check ensures that the used version aligns with the required version, which is exported as an environmental variable. There's not a way (if I know) to check, that server configuration was accepted and applied so all we can check is value inside settings.
Using console.log() could potentially reduce the readability of the test result log. Although I have the option to add a step in the 'productized.yaml' pipeline to echo the global variable value. What do you think?

I would like to see it directly in the log when playing the test suite even locally. Consequently, another step in the GitHub Actions won't cover this use case. Given that GitHub UI is cropping job names, I missed it. We can see it when going directly to the job itself as title. I will try to report issues to improve the GitHub UI.

Maybe providing a name of test for 00_set.camel.version.test.ts making it clear which version is used could be a good place.

Implemented.

@pospisilf pospisilf requested a review from apupier January 8, 2024 18:56
@djelinek
Copy link
Member

so cool to have tests with productized version it would be convenient to have the camel version used visible in the log in some ways (console.log? the name of the tests ?) https://github.com/camel-tooling/camel-lsp-client-vscode/actions/runs/7395686841/job/20119333839?pr=1611 It will help to ensure that we are really testing with another version and when investigating a log to be sure which version is used.

The used version is included in the job's name for clarity, and there is a check implemented in '00_set.camel.version.test.ts'. This check ensures that the used version aligns with the required version, which is exported as an environmental variable. There's not a way (if I know) to check, that server configuration was accepted and applied so all we can check is value inside settings.
Using console.log() could potentially reduce the readability of the test result log. Although I have the option to add a step in the 'productized.yaml' pipeline to echo the global variable value. What do you think?

I would like to see it directly in the log when playing the test suite even locally. Consequently, another step in the GitHub Actions won't cover this use case. Given that GitHub UI is cropping job names, I missed it. We can see it when going directly to the job itself as title. I will try to report issues to improve the GitHub UI.

Maybe providing a name of test for 00_set.camel.version.test.ts making it clear which version is used could be a good place.

@apupier is this something you were looking for? cc @pospisilf

image

@apupier
Copy link
Member

apupier commented Jan 11, 2024

@apupier is this something you were looking for? cc @pospisilf

image

this is nice for version matrix on GitHub action.
Current state of teh PR is fine I think. We can improve in another iteration. I already have some other suggestions/questions that would delay this PR potentially too much.

}

// set version in ui
const settings = await new Workbench().openSettings();
Copy link
Member

Choose a reason for hiding this comment

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

could you please investigate option how to set this property directly in setting.json using filesystem, not using UI?

@djelinek
Copy link
Member

@pospisilf I have pushed here one commit with some suggestions to make this approach more "clear"

}

// set version directly
await setUserSettingsDirectly(CATALOG_VERSION_ID, process.env.CAMEL_VERSION);
Copy link
Member

Choose a reason for hiding this comment

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

no need of await if setUserSettingsDirectly is using sync methods

* @param id ID of setting.
* @param value Value of setting.
*/
export async function setUserSettingsDirectly(id: string, value: string): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

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

no need to use async function returning promise

Copy link

sonarcloud bot commented Jan 14, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@pospisilf
Copy link
Contributor Author

bigger improvements were made, requesting new reviews

@djelinek djelinek merged commit c0137de into camel-tooling:main Jan 15, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants