streampipes icon indicating copy to clipboard operation
streampipes copied to clipboard

Update_versions script of installer is broken

Open dominikriemer opened this issue 2 years ago • 14 comments

Body

To bump the current StreamPipes version in the various installers (docker-compose, CLI and k8s helm charts), we use the upgrade_version.sh script in the installer folder. After some changes to the `values.yaml file, the versions script seems to be broken as it not only replaces StreamPipes versions, but also the versions of Consul, CouchDB and InfluxDB.

  • Link to the commit where the bug was first seen: https://github.com/apache/streampipes/pull/1658/commits/b3ff92127ee7a41e89ea91df4501160ef9c9e245

  • How to resolve Revisit the logic in the upgrade_versions module and make sure that only the versions related to StreamPipes are updated.

Mentoring

As this issue is marked as good first issue: one of @dominikriemer, @tenthe, are happy to provide help for getting started, just tag (one of) them if you want to start working on this issue and need some help. This issue is ideal for people that are interested in getting started with StreamPipes and like to apply some bash magic..

StreamPipes Committer

I acknowledge that I am a maintainer/committer of the Apache StreamPipes project.

dominikriemer avatar Jun 05 '23 14:06 dominikriemer

Hi @dominikriemer, maybe I can have a try. I think we can simply match the version field between the streampipes and external sections to solve the problem.

loststar avatar Jun 10 '23 05:06 loststar

Another approach could be to check the current version and only replace those values

tenthe avatar Jun 10 '23 10:06 tenthe

Another approach could be to check the current version and only replace those values

Great idea! However, this behavior could be risky if the version of StreamPipes is the same as the version of other components.

loststar avatar Jun 10 '23 10:06 loststar

Hi @tenthe, I've drafted a version that works well, but we still need to discuss the special cases mentioned before.

loststar avatar Jun 10 '23 15:06 loststar

Hi, thanks for the PR. You are right the script will not work for this case. Unfortunately, I do not have a good idea yet except for checking the git diff manually after running the script 🤔 Do you have an idea how we could catch this problem?

tenthe avatar Jun 12 '23 05:06 tenthe

I have a couple of ideas that might be helpful, but I'm not sure if they're good ideas or not.

  • Add locators like this to the file to help improve the script positioning.
  • Explore using ConfigMaps in k8s. Maybe this could potentially help us use an alias to replace the value of StreamPipes' version.

BTW, maybe we can use the previous PR as a workaround and keep this issue open for further exploration.

loststar avatar Jun 12 '23 09:06 loststar

Thanks, yes I agree. We should merge your PR and leave this issue open.

tenthe avatar Jun 12 '23 11:06 tenthe

I have a couple of ideas that might be helpful, but I'm not sure if they're good ideas or not.

* Add locators like [this](https://github.com/apache/streampipes/blob/7fff17c768f7511d39bed38ed7dc455c1058670f/installer/k8s/README.md?plain=1#L21) to the file to help improve the script positioning.

* Explore using [ConfigMaps](https://kubernetes.io/docs/concepts/configuration/configmap/) in k8s. Maybe this could potentially help us use an alias to replace the value of StreamPipes' version.

BTW, maybe we can use the previous PR as a workaround and keep this issue open for further exploration.

Thanks a lot for your input @loststar 🙏🏼 FYI: this might relate to a project we have in this year's OSPP challenge: https://summer-ospp.ac.cn/org/prodetail/23fc00416?lang=en&list=pro

bossenti avatar Jun 13 '23 15:06 bossenti

I have a couple of ideas that might be helpful, but I'm not sure if they're good ideas or not.

* Add locators like [this](https://github.com/apache/streampipes/blob/7fff17c768f7511d39bed38ed7dc455c1058670f/installer/k8s/README.md?plain=1#L21) to the file to help improve the script positioning.

* Explore using [ConfigMaps](https://kubernetes.io/docs/concepts/configuration/configmap/) in k8s. Maybe this could potentially help us use an alias to replace the value of StreamPipes' version.

BTW, maybe we can use the previous PR as a workaround and keep this issue open for further exploration.

Thanks a lot for your input @loststar 🙏🏼 FYI: this might relate to a project we have in this year's OSPP challenge: https://summer-ospp.ac.cn/org/prodetail/23fc00416?lang=en&list=pro

Thanks for the information. If the OSPP participants will refine this feature, I'm willing to stay engaged in the discussion, or I'll continue to follow this issue. @bossenti After consideration, I think the following approach aligns better with our goals: incorporating specific comments before and after the version number, similar to this example, and utilizing a script to match the version number within the restricted section. I will make an attempt to draft a version at a later date to assess its effectiveness.

loststar avatar Jul 17 '23 14:07 loststar

@RobertIndie how is the status of the OSPP challenge?

bossenti avatar Jul 18 '23 06:07 bossenti

Thanks for reminding me of this issue. @bossenti Yes. This is related to the upgrading support of the OSPP challenge. @luoluoyuyu Could you take a look at this issue?

RobertIndie avatar Jul 18 '23 10:07 RobertIndie

@loststar thank you very much for your input here 🙏 Would be great if you continue bringing your knowledge into to discussion 🙂

bossenti avatar Jul 18 '23 10:07 bossenti

Hi @bossenti,

I have executed the script, and it appears that the Update_versions script can only modify the version number of Streampipes. Is the question we are facing about precisely determining the location where the version number needs to be changed?

luoluoyuyu avatar Jul 19 '23 07:07 luoluoyuyu

Yes, if my understanding is correct @dominikriemer am I right?

bossenti avatar Jul 23 '23 12:07 bossenti