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

Allow to specify range specification instead of fixed version #38

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

potiuk
Copy link
Contributor

@potiuk potiuk commented Aug 22, 2020

That allows to install for example the latest bug-fix version of
terraform 1.12.* even if 1.13 is already installed.

@potiuk
Copy link
Contributor Author

potiuk commented Aug 22, 2020

Hello committers. After the recent release of Terraform 1.13.0 we cannot yet switch to it in our project (some incompatibilities) but we would love to keep on installing 1.12.* versions automatically in case they are released with some bugfixes.

I've added the capability of specifying '<VERSION' constraint which installs the latest version satisfying the constraints.
I would love to get it merged!

You can see it working here: https://github.com/potiuk/test-terrraform/runs/1016403555?check_suite_focus=true#step:3:6

@potiuk
Copy link
Contributor Author

potiuk commented Aug 24, 2020

I'd love to get this one merged :)

@potiuk
Copy link
Contributor Author

potiuk commented Aug 29, 2020

Any hopes of attention from maintainers please :)?

@mik-laj
Copy link

mik-laj commented Aug 29, 2020

@sudomateo @chenrui333 Can you help me with it? I really want to use it.

@alexjurkiewicz
Copy link
Contributor

alexjurkiewicz commented Sep 8, 2020

This PR should support version strings with tilde prefix. ~0.12.0 would support all 0.12.x versions and is IMO clearer than <0.13.0. Maybe you could update the README to use this format?

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Sure. Good point. I can add this possibility. I am using semver library and it supports ~ so I can extend it to support strings starting with any of the supported matchers.

@potiuk potiuk force-pushed the master branch 2 times, most recently from 803d41a to fa86e47 Compare September 8, 2020 09:26
@potiuk potiuk changed the title Add functionality to specify '<VERSION' as version of Terraform. Allow to specify range specification instead of fixed version Sep 8, 2020
@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

All right - this is now much nicer - all ranges supported by semver are also supported, I've added tests covering several cases of ranges matching (and I added checks if matched version is as expected).

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

I also corrected some grammar while updating the docs for it :)

@alexjurkiewicz
Copy link
Contributor

That's wonderful stuff. It looks like you have given up waiting for Hashicorp and are publishing your own fork? Are you planning to maintain long-term? 🤞

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Well. I have not given up (yet, dear Hashicorp maintainers), I just published it for my own use as I needed it it in my own CI pipeline :).

I am happy to release a new version in my own fork for now though. Give me a minute.

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

There you are @alexjurkiewicz https://github.com/marketplace/actions/hashicorp-setup-terraform-with-constraints

@sudomateo @chenrui333 -> I'd really love that one to be merged so that people won't have to rely on my fork :).

If there is anything else I can do to get it merged, please let me know.

Copy link
Contributor

@sudomateo sudomateo left a comment

Choose a reason for hiding this comment

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

Thank you for the work on this. I was on vacation for the last few weeks. I'm also not the maintainer of this project anymore. Since I was pinged a few times I took a look at it.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Thank you for the work on this. I was on vacation for the last few weeks. I'm also not the maintainer of this project anymore. Since I was pinged a few times I took a look at it.

Thanks! I understand, and sorry for the pinging, but it's hard to know whom can we ping.
All your comments are addressed now.

Copy link
Contributor

@sudomateo sudomateo left a comment

Choose a reason for hiding this comment

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

I hear you. I'm still trying to find a maintainer for this project going forward, but it's proving to be difficult thanks to COVID-19.

action.yml Outdated Show resolved Hide resolved
That allows to install for example the latest bug-fix version of
terraform 1.12.* even if 1.13 is already installed.
@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

I hear you. I'm still trying to find a maintainer for this project going forward, but it's proving to be difficult thanks to COVID-19.

Hmm. Happy to take it over, but I guess this cannot be done if I am not a Hashicorp employee.

@sudomateo
Copy link
Contributor

@potiuk I can always ask. I believe we'd need to move this to the hashicorp-community organization to do that.

Either way, I began testing these changes in https://github.com/sudomateo/urban-bassoon/actions and I was not able to get the ~0.12 or 0.12.x syntax working. Only <0.13.0 worked.

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

@potiuk I can always ask. I believe we'd need to move this to the hashicorp-community organization to do that.

Either way, I began testing these changes in https://github.com/sudomateo/urban-bassoon/actions and I was not able to get the ~0.12 or 0.12.x syntax working. Only <0.13.0 worked.

Run potiuk/setup-terraform@master

You used potiuk/setup-terraform@master and I released it in my fork with v1.3.0 version

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

This is the weird thing about Github Actions - the tip of branches have nothing to do with marketplace releases. I can release master now :)

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Ach no - it would work normally with master as well, but since I changed the name back, it is not automatically moving the tag becuase the name is duplicate of the Hashicorp one 🤷‍♀️

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

v1.3.0 is still with the modified name so you can use it for testing. The only difference are the corrected descriptions

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Screenshot from 2020-09-08 15-44-28

@sudomateo
Copy link
Contributor

Testing with v1.3.0 now.

@sudomateo sudomateo merged commit af8505e into hashicorp:master Sep 8, 2020
@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Wohoo!

@mik-laj
Copy link

mik-laj commented Sep 8, 2020

🎉

@sudomateo @potiuk Thank you.

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Thanks @sudomateo -> let me know about the maintenance thing. It's not a lot of work, this action is rather useful, and since I leave and breathe open-source for 2 years now, I am happy to do some of those things outside of the main community I contribute to (Apache Airflow). If you'd plan to make it full community driven maybe we can have a small group of people to volunteer to maintain this an possibly few others tools around open-source Hashicorp stuff. I think Hashicorp had contributed a lot to the community and giving back is a good thing to do.

We've added Hashicorp Vault Secret Backend recently (I extended it and added native Hook integration to Vault) and very recently we started to discuss native Terraform integration for Apache Airflow apache/airflow#10454 and I know at least few people who love Terraform and other Hashicorp's tools and with open-source mindset so maybe we can help somehow.

@mik-laj
Copy link

mik-laj commented Sep 8, 2020

We also working on a Terraform provider for Apache Airflow: apache/airflow#10550

@potiuk
Copy link
Contributor Author

potiuk commented Sep 8, 2020

Indeed @mik-laj :).

I de-listed my forked action from the marketplace now BTW.

@alexjurkiewicz
Copy link
Contributor

Thank you @potiuk and @sudomateo ❤️
I would like to put my hand up for helping maintain this too.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants