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

674 Add possibility to run different TCR variants #792

Merged
merged 44 commits into from
Oct 1, 2024
Merged

Conversation

mengdaming
Copy link
Contributor

Description:

Add a new variant flag allowing to run TCR with different variants:

Fixes #674

Type of change

Please tick the appropriate option using [x]

  • Bug fix
  • New feature

Checklist:

Please tick the appropriate options using [x]

  • My PR includes tests that cover my code changes.
  • Lint and formatter run with no errors
  • All new and old tests are passing

mengdaming and others added 30 commits August 12, 2024 16:54
- add a test for SessionInfo
- add a TCR.SetFlavor(...) method to interface
- pass Flavor param to TCREngine
- print the Flavor in Terminal.ShowSessionInfo
- add "nice" flavor by default in fakes and test doubles
- pass the Flavor through HTTP
- update the html to display the flavor
- adapt structs and tests
- Big grep replace
- Update docs
- Rename nice to relaxed
- Rename original to btcr
- Implement a new Variant enum
- Replace the usage of relaxed and btcr by the enum values
- Implement the function Name that returns the value of the Variant as a string
- Use the function in the code
- Check whether a file contains a 'test' to know if it is a test file
- Added tests for different revert configuration of the relaxed TCR
- Replace tests by parameterized tests
- Added new test that covers not reverting test files
- Add tests
- Inline revertSrc() file into revert()
- Extract shouldRevertFile()
- Extract noFilesRevertedMessage()
- create variant-introspective.mmd
- update other diagrams to add "VCS" on VCS-related actions
- generate png files
To document what this new variant does
- add a section
- add a description of the variant
- also add an extract from T Deniffel's post to explain what the
  other variants are
So that users can input variant=introspective
- add introspective to variant enum
- make sure web app understand the introspective variant
- add test placeholder for param variant value checking
- add test placeholder for introspective variant execution by engine
- change param.variant type to string to be consistant with other params handling
- remove config/param_variant_test.go
- add variant.Select(string) to manage variant instance selection
- add UnsupportedVariantError (returned when variant name is not recognized)
- ensure TCR engine exits on error when variant is not recognized
- add a list of received commands in VCS fake so that we can test that we got "commit && revert"
- add vcsfake.GetLastCommands(n) to get the tail of the list of last commands
- add vcsfake.VerifyLastCommandsAre() as an alternative approach
mengdaming and others added 14 commits September 18, 2024 10:49
- remove vcsfake.VerifyLastCommandsAre() alternative approach
To have clearer names for all VCS
- rename interface function
- adapt fake
To have clearer names for all VCS
- rename interface function
- adapt fake
To clean up code now that we don't support commit failures
- add tcr.introspectiveRevert()
- inject call to introspectiveRevert() in tcr.revert()
- tune and pass test case on revert for introspective variant
- Clean the tcr.revert function
- Added an array in vcs fake to track the commit subjects
- Add tests to verify the output of messages
Because we don't need it anymore without the 'commit failure' option
- remove parameter from interface
- adapt implementations
- simplify tests
- adapt calls
- refactor simple and introspective Reverts to simplify error handling
- add a test to make sure we deal with VCS errors in introspectiveRevert
So that we can use our own commit message when reverting
- add option "--no-commit" to git revert command
- tune git package tests accordingly
- Implement the function variant.checkVariant
- Rename checkWorkflowConfiguration to checkVariantConfiguration
- Add tests to verify the function variant.checkVariant
- Allowed variant names to be case-insensitive
- renamed test cases from restore to revert_local
- renamed git test case from revert to rollback_last_commit
- added p4 rollback_last_commit test case (wip)
@mengdaming mengdaming linked an issue Oct 1, 2024 that may be closed by this pull request
82 tasks
Copy link

sonarqubecloud bot commented Oct 1, 2024

@mengdaming mengdaming merged commit c748bef into main Oct 1, 2024
15 checks passed
@mengdaming mengdaming deleted the 674-real-tcr branch October 1, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Support "real" TCR that also reverts tests
3 participants