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

fix(gittag) ensure gittag targets does not fail due to (unspecified) version filters #1407

Merged
merged 4 commits into from
Jul 3, 2023

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented Jul 3, 2023

This PR fixes the gittag resource where the target fails due to the default Version Filter.

There are 2 blocking bugs fixed at the same time:

  • Comparing error message between 2 packages is fragile as the errors templates are subject to changes
    • The proposed solution here is to export the errors in the version so their error message (template) can be reused for solid comparison.
  • Validating the target configuration must be done against the spec (provided by user) and not against the internal configuration

Test

  • Unit tests have been checked (and will be by the github action checks as a reference)
  • The End to end test has been renamed and updated to cover all cases:
    • Both Git and GitHub SCM for gittag sources
    • Both Git and GitHub SCM for gittag conditions (always passing)
    • Added both Git and GitHub SCM for gittag targets (to underline the fixed errors which is caught at the updatecli diff steps already)
    • Added a target case expected to never change (trying to create an existing tag)

Additional Information

Caught while working on #1406

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
…Filters

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal added bug Something isn't working target Related to updatecli target resource-gittag Resource of kind Git Tag labels Jul 3, 2023
@dduportal dduportal requested a review from olblak July 3, 2023 09:53
@dduportal dduportal marked this pull request as ready for review July 3, 2023 09:53
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Copy link
Member

@olblak olblak left a comment

Choose a reason for hiding this comment

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

Very clean
Does the pullrequest introduces a breaking change?

@olblak
Copy link
Member

olblak commented Jul 3, 2023

Very clean Does the pullrequest introduces a breaking change?

I don't think so but better to ask

@dduportal
Copy link
Contributor Author

Very clean Does the pullrequest introduces a breaking change?

It should not. If it does, then it would be a bug (and I would work on fixing it as soon as possible)

@dduportal dduportal merged commit 7bd7d28 into updatecli:main Jul 3, 2023
6 checks passed
@dduportal dduportal deleted the fix/gittag/target-and-e2e branch July 3, 2023 14:43
@olblak olblak added this to the 0.55.0 milestone Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-gittag Resource of kind Git Tag target Related to updatecli target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants