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(internal/ext): add 1.1 to versions and validate explicit 1.2 #2042

Merged
merged 5 commits into from
Aug 23, 2023

Conversation

GeorgeMac
Copy link
Member

A user reported a couple issues which this PR addresses.

  1. file state format 1.1 was being reported as "unsupported"
2023-08-23T12:09:26Z   FATAL   execute {"error": "unsupported version: 1.1"}
  1. when explicitly setting to 1.2 it also produced errors
/opt/flags $ /flipt validate tmp.yaml
Validation failed!

- Message  : version: 2 errors in empty disjunction:
  File     : tmp.yaml
  Line     : 0
  Column   : 0

- Message  : version: conflicting values "1.0" and "1.2"
  File     : tmp.yaml
  Line     : 3
  Column   : 11

- Message  : version: conflicting values "1.1" and "1.2"
  File     : tmp.yaml
  Line     : 3
  Column   : 11

- Message  : flags.0._version: 2 errors in empty disjunction:
  File     : tmp.yaml
  Line     : 16
  Column   : 5

- Message  : flags.0._version: conflicting values "1.0" and "1.2"
  File     : tmp.yaml
  Line     : 4
  Column   : 24

- Message  : flags.0._version: conflicting values "1.1" and "1.2"
  File     : tmp.yaml
  Line     : 4
  Column   : 24

- Message  : flags.0.type: field not allowed
  File     : tmp.yaml
  Line     : 17
  Column   : 3

This was due to a couple issues.

  1. We never retained version 1.1 in the supported versions lists in internal/ext.
  2. We never added the new version 1.2 to the validation of the CUE schema.

We will add some better regression testing in a later PR.
For now I have attempted to improve the unit tests in these packages with more of the missing cases.

@GeorgeMac GeorgeMac requested a review from a team as a code owner August 23, 2023 13:28
Copy link
Contributor

@yquansah yquansah left a comment

Choose a reason for hiding this comment

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

LG

Copy link
Collaborator

@markphelps markphelps left a comment

Choose a reason for hiding this comment

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

lgtm! lets rebase onto release/1.25 branch and we can get a patch release out

@GeorgeMac GeorgeMac enabled auto-merge (squash) August 23, 2023 13:34
@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Merging #2042 (176f551) into main (e40c17e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2042   +/-   ##
=======================================
  Coverage   70.62%   70.62%           
=======================================
  Files          72       72           
  Lines        6821     6821           
=======================================
  Hits         4817     4817           
  Misses       1733     1733           
  Partials      271      271           
Files Changed Coverage Δ
internal/ext/exporter.go 85.47% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@GeorgeMac GeorgeMac added the automerge Used by Kodiak bot to automerge PRs label Aug 23, 2023
@GeorgeMac GeorgeMac disabled auto-merge August 23, 2023 13:43
@kodiakhq kodiakhq bot merged commit 29f9ce6 into main Aug 23, 2023
@kodiakhq kodiakhq bot deleted the gm/fix-import-and-validate branch August 23, 2023 14:06
markphelps pushed a commit that referenced this pull request Aug 23, 2023
* fix(internal/ext): add 1.1 to versions and validate explicit 1.2

* chore(internal/ext): remove redundent idGen field

* chore: skip unparam for function receiving constant

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
markphelps added a commit that referenced this pull request Aug 24, 2023
…to mp/monaco-redo

* 'mp/monaco-redo' of https://github.com/flipt-io/flipt:
  chore: fix nightly build; add footer to release notes on GH (#2041)
  chore: bump changelog for 1.25.2
  fix(internal/ext): add 1.1 to versions and validate explicit 1.2 (#2042)
  chore: update go mod
  fix(internal/ext): add 1.1 to versions and validate explicit 1.2 (#2042)
  chore(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 (#2037)
  chore(deps-dev): bump postcss from 8.4.27 to 8.4.28 in /ui (#2028)
  chore: change parameter name of PKCE
  feat(oidc): Add parameters for pkce flow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Used by Kodiak bot to automerge PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants