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(version): use tagged version instead of VERSION file while build #1733

Merged
merged 4 commits into from
Jul 20, 2020

Conversation

shubham14bajpai
Copy link
Contributor

@shubham14bajpai shubham14bajpai commented Jul 16, 2020

Signed-off-by: shubham shubham.bajpai@mayadata.io

What this PR does?:
This PR removes the version file dependency on the image builds. This PR modifies the build scripts to take Travis tag or the version from the VERSION file of the build. This PR also refactors some functions that relied on the version to be specifically of the type x.y.z as the versions can differ with custom tags and RC tags. PR also comment outs some test cases based on the changes.

Does this PR require any upgrade changes?:

If the changes in this PR are manually verified, list down the scenarios covered::
After building images with a custom tag 1.11.0-ce-rc2

  • Provisioned cstor SPC
  • Provisioned cstor volume
  • Provisioned jiva volume
  • Deleted jiva volume
  • Deleted cstor volume
  • Deleted cstor SPC
  • Deleted runtasks and restarted api-server, all the runtasks came back with correct version.
  • Tested upgrade from 1.10.0

Runtasks with custom version

mayadata:setup$ kubectl get runtasks.openebs.io -n openebs
NAME                                                                  AGE
cas-volume-stats-default-1.11.0-ce-rc2                                    3m58s
cas-volume-stats-output-default-1.11.0-ce-rc2                             3m58s
cstor-pool-create-getspc-default-1.11.0-ce-rc2                            4m1s
cstor-pool-create-patchstoragepoolclaim-default-1.11.0-ce-rc2             4m1s
cstor-pool-create-putcstorpoolcr-default-1.11.0-ce-rc2                    4m1s
cstor-pool-create-putcstorpooldeployment-default-1.11.0-ce-rc2            4m1s
cstor-snapshot-create-createsnapshot-default-1.11.0-ce-rc2                3m59s
cstor-snapshot-create-listtargetservice-default-1.11.0-ce-rc2             3m59s
cstor-snapshot-create-output-default-1.11.0-ce-rc2                        3m59s
cstor-snapshot-delete-deletesnapshot-default-1.11.0-ce-rc2                3m58s
cstor-snapshot-delete-listtargetservice-default-1.11.0-ce-rc2             3m58s
cstor-snapshot-delete-output-default-1.11.0-ce-rc2                        3m58s
cstor-volume-create-getpvc-default-1.11.0-ce-rc2                          4m
cstor-volume-create-getstorageclass-default-1.11.0-ce-rc2                 4m
cstor-volume-create-listclonecstorvolumereplicacr-default-1.11.0-ce-rc2   4m
cstor-volume-create-listcstorpoolcr-default-1.11.0-ce-rc2                 4m
cstor-volume-create-output-default-1.11.0-ce-rc2                          4m
cstor-volume-create-putcstorvolumecr-default-1.11.0-ce-rc2                4m
cstor-volume-create-putcstorvolumereplicacr-default-1.11.0-ce-rc2         4m
cstor-volume-create-puttargetdeployment-default-1.11.0-ce-rc2             4m
cstor-volume-create-puttargetservice-default-1.11.0-ce-rc2                4m
cstor-volume-delete-deletecstorvolumecr-default-1.11.0-ce-rc2             3m59s
cstor-volume-delete-deletecstorvolumereplicacr-default-1.11.0-ce-rc2      3m59s
cstor-volume-delete-deletetargetdeployment-default-1.11.0-ce-rc2          3m59s
cstor-volume-delete-deletetargetservice-default-1.11.0-ce-rc2             3m59s
cstor-volume-delete-listcstorvolumecr-default-1.11.0-ce-rc2               3m59s
cstor-volume-delete-listcstorvolumereplicacr-default-1.11.0-ce-rc2        3m59s
cstor-volume-delete-listtargetdeployment-default-1.11.0-ce-rc2            3m59s
cstor-volume-delete-listtargetservice-default-1.11.0-ce-rc2               3m59s
cstor-volume-delete-output-default-1.11.0-ce-rc2                          3m59s
cstor-volume-list-listcstorvolumereplicacr-default-1.11.0-ce-rc2          4m
cstor-volume-list-listpv-default-1.11.0-ce-rc2                            4m
cstor-volume-list-listtargetpod-default-1.11.0-ce-rc2                     4m
cstor-volume-list-listtargetservice-default-1.11.0-ce-rc2                 4m
cstor-volume-list-output-default-1.11.0-ce-rc2                            3m59s
cstor-volume-read-listcstorvolumecr-default-1.11.0-ce-rc2                 3m59s
cstor-volume-read-listcstorvolumereplicacr-default-1.11.0-ce-rc2          3m59s
cstor-volume-read-listtargetpod-default-1.11.0-ce-rc2                     3m59s
cstor-volume-read-listtargetservice-default-1.11.0-ce-rc2                 3m59s
cstor-volume-read-output-default-1.11.0-ce-rc2                            3m59s
jiva-snapshot-create-invokehttp-default-1.11.0-ce-rc2                     3m58s
jiva-snapshot-create-listsourcetargetservice-default-1.11.0-ce-rc2        3m58s
jiva-snapshot-create-output-default-1.11.0-ce-rc2                         3m58s
jiva-snapshot-podsinopenebsns-default-1.11.0-ce-rc2                       3m58s
jiva-volume-create-getpvc-default-1.11.0-ce-rc2                           4m2s
jiva-volume-create-getstorageclass-default-1.11.0-ce-rc2                  4m2s
jiva-volume-create-getstoragepoolcr-default-1.11.0-ce-rc2                 4m2s
jiva-volume-create-output-default-1.11.0-ce-rc2                           4m2s
jiva-volume-create-putreplicadeployment-default-1.11.0-ce-rc2             4m2s
jiva-volume-create-puttargetdeployment-default-1.11.0-ce-rc2              4m2s
jiva-volume-create-puttargetservice-default-1.11.0-ce-rc2                 4m2s
jiva-volume-delete-deletereplicadeployment-default-1.11.0-ce-rc2          4m1s
jiva-volume-delete-deletetargetdeployment-default-1.11.0-ce-rc2           4m1s
jiva-volume-delete-deletetargetservice-default-1.11.0-ce-rc2              4m1s
jiva-volume-delete-listreplicadeployment-default-1.11.0-ce-rc2            4m1s
jiva-volume-delete-listreplicapod-default-1.11.0-ce-rc2                   4m1s
jiva-volume-delete-listtargetdeployment-default-1.11.0-ce-rc2             4m1s
jiva-volume-delete-listtargetservice-default-1.11.0-ce-rc2                4m1s
jiva-volume-delete-output-default-1.11.0-ce-rc2                           4m1s
jiva-volume-delete-putreplicascrub-default-1.11.0-ce-rc2                  4m1s
jiva-volume-isvalidversion-default-1.11.0-ce-rc2                          4m4s
jiva-volume-list-listpv-default-1.11.0-ce-rc2                             4m3s
jiva-volume-list-listreplicapod-default-1.11.0-ce-rc2                     4m3s
jiva-volume-list-listtargetpod-default-1.11.0-ce-rc2                      4m3s
jiva-volume-list-listtargetservice-default-1.11.0-ce-rc2                  4m3s
jiva-volume-list-output-default-1.11.0-ce-rc2                             4m3s
jiva-volume-podsinopenebsns-default-1.11.0-ce-rc2                         4m4s
jiva-volume-read-listreplicapod-default-1.11.0-ce-rc2                     4m2s
jiva-volume-read-listtargetpod-default-1.11.0-ce-rc2                      4m3s
jiva-volume-read-listtargetservice-default-1.11.0-ce-rc2                  4m3s
jiva-volume-read-output-default-1.11.0-ce-rc2                             4m2s
jiva-volume-read-patchreplicadeployment-default-1.11.0-ce-rc2             4m2s
jiva-volume-read-verifyreplicationfactor-default-1.11.0-ce-rc2            4m2s
storage-pool-list-default-1.11.0-ce-rc2                                   3m58s
storage-pool-list-output-default-1.11.0-ce-rc2                            3m58s
storage-pool-read-default-1.11.0-ce-rc2                                   3m58s
storage-pool-read-output-default-1.11.0-ce-rc2                            3m58s

Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Checklist:

  • Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Has the change log section been updated?
  • Commit has unit tests
  • Commit has integration tests
  • (Optional) Are upgrade changes included in this PR? If not, mention the issue/PR to track:
  • (Optional) If documentation changes are required, which issue on https://github.com/openebs/openebs-docs is used to track them:

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
@shubham14bajpai shubham14bajpai changed the title fix(version): remove version file from build fix(version): remove version file from tag build Jul 17, 2020
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
@mittachaitu
Copy link

mittachaitu commented Jul 17, 2020

make test is failing in Travis we can change the expected output to small case letters get test case fixed(It is expected to change the test case since the behavior of the function is changed).

Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

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

looks good once the Travis is passed I will approve it

@shubham14bajpai shubham14bajpai added the pr/hold-merge Hold on the merge to complete few activities. label Jul 17, 2020
Signed-off-by: shubham <shubham.bajpai@mayadata.io>
@mittachaitu mittachaitu removed the pr/hold-merge Hold on the merge to complete few activities. label Jul 17, 2020
Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

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

changes are good

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

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

lgtm

@prateekpandey14 prateekpandey14 changed the title fix(version): remove version file from tag build fix(version): use tagged version instead of VERSION file while build Jul 20, 2020
@prateekpandey14 prateekpandey14 merged commit 3843834 into openebs-archive:master Jul 20, 2020
shubham14bajpai added a commit to shubham14bajpai/maya that referenced this pull request Jul 20, 2020
…openebs-archive#1733)

- fix unstructured resource names to make it compatible with new version format
- fixed runtask names and corresponding envs and castemplate to honour 
   the version changes

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
prateekpandey14 pushed a commit that referenced this pull request Jul 20, 2020
…#1733) (#1734)

- fix unstructured resource names to make it compatible with new version format
- fixed runtask names and corresponding envs and castemplate to honour 
   the version changes

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
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.

3 participants