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

osmajorrelease is int instead of str since 2017.7.1 #60

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

itscaro
Copy link
Contributor

@itscaro itscaro commented Dec 22, 2020

Cf type changed for osmajorrelease: https://github.com/saltstack/salt/blob/v2017.7.1/salt/grains/core.py#L1675

After digging a bit, I found the reason why this formula is backward compatible, there is type trying in this function which is used by filter_by function defined in salt/modules/grains.py
https://github.com/saltstack/salt/blob/4669f1373a5524fd22a45ff730717a382272f753/salt/utils/data.py#L815-L839

I encountered this issue when using salt-ssh which uses another version of filter_by function provided by salt/client/ssh/wrapper/grains.py, which is type-enforced.

Fixes #58

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

Yes for version < 2017.7

Related issues and/or pull requests

Describe the changes you're proposing

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

@itscaro itscaro force-pushed the patch-1 branch 3 times, most recently from d7e32ac to 582b5ff Compare December 22, 2020 21:58
@itscaro itscaro changed the title osmajorrelease is int instead of str since 2017.7 osmajorrelease is int instead of str since 2017.7.1 Dec 22, 2020
@myii
Copy link
Member

myii commented Dec 22, 2020

Thanks for this PR, @itscaro. I fixed the hyperlink you provided since it was a 404.

I was about to suggest how to get the commitlint passing but I see you've managed that! So just the tests now and this can be merged.

@myii
Copy link
Member

myii commented Dec 22, 2020

OK, the link for CentOS 8 needs updating to:

Would you mind adding that as well, @itscaro?

@myii
Copy link
Member

myii commented Dec 22, 2020

@itscaro Something like the following to pass the commitlint:

fix(map.jinja): update link to `rpm` for `EPEL-8`

@itscaro
Copy link
Contributor Author

itscaro commented Dec 22, 2020

OK, the link for CentOS 8 needs updating to:

Would you mind adding that as well, @itscaro?

I saw the error in Gitlab and push another commit in this PR.

@myii
Copy link
Member

myii commented Dec 22, 2020

I saw the error in Gitlab and push another commit in this PR.

@itscaro Thanks, we just need all of the commits to make commitlint happy! So for that last commit, please change the commit title to:

-update to epel-release-8-10.el8.noarch.rpm
+fix(map.jinja): update to `epel-release-8-10.el8.noarch.rpm`

@itscaro
Copy link
Contributor Author

itscaro commented Dec 22, 2020

Thanks for this PR, @itscaro. I fixed the hyperlink you provided since it was a 404.

I was about to suggest how to get the commitlint passing but I see you've managed that! So just the tests now and this can be merged.

Yes I did not realized that I was in a forked repo :) - I changed after you passed by (sorry I didn't see the comments, was trying to fix lint :) )

Sorry again for the lint errors

Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
@myii
Copy link
Member

myii commented Dec 22, 2020

Sorry again for the lint errors

No problem at all, it took us some time to get used to it as well! If GitLab passes, then we'll merge this. Don't worry about the other commitlint error here in GitHub Actions.

@myii myii merged commit 5c26ebd into saltstack-formulas:master Dec 22, 2020
@myii
Copy link
Member

myii commented Dec 22, 2020

Merged, thanks for the fix, @itscaro!

@saltstack-formulas-travis

🎉 This PR is included in version 1.15.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@itscaro
Copy link
Contributor Author

itscaro commented Dec 22, 2020

Merged, thanks for the fix, @itscaro!

@myii the changelog contains bad urls, must be me with my comments full of urls

@myii
Copy link
Member

myii commented Dec 22, 2020

@myii the changelog contains bad urls, must be me with my comments full of urls

No, this is a known bug that I've reported:

Don't worry, it's not your fault. We don't have to open another PR to fix it, the main information we need is there and people can click the hyperlinks to see the commits. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] EPEL is not getting installed in rhel 8
3 participants