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 e2e tests, drop Ubuntu18 #332

Merged
merged 6 commits into from
Oct 19, 2023
Merged

Fix e2e tests, drop Ubuntu18 #332

merged 6 commits into from
Oct 19, 2023

Conversation

setswei
Copy link
Contributor

@setswei setswei commented Oct 17, 2023

Hey @armab

I have found the issues with the ansible-st2 build process

  1. There was an incompatibility with docker-py using the latest versions of the requests and urllib3 libraries. This caused issues with molecule talking to the docker API on the host machine. Installing the requests<=2.29.0 resolved this issue. More info located here -> urllib3 v2 incompatibility docker/docker-py#3113

  2. After getting the build processes working again I found that Ubuntu 18.04 tests would fail. this is due to MongoDB allowing the apt key for MongoDB 4.0 to expire. From the looks of some of the forum posts on the MongoDB community, they are not going to fix this as Ubuntu 18.04 was EOL on May 31 2023. For now, I have removed Ubuntu 18.04 from the build process, to resolve the MongoDB installation issues the role would have to be modified to download the deb packages directly and then install them (which can easily be done) but the main question I would put forward is should ubuntu 18.04 continued to be supported when there will be no mainstream OS level patches and vendors are dropping support as well.

As you can see below the builds are now working (except for Ubuntu 18.04)
image

If you check my repository you will see subsequent builds that have been completed with ubuntu 18.04 excluded

…3==1.26.13 which breaks docker-py and molecule cannont talk to the docker api on the host. version 2.29.0 of the requests python library is currently the known fix -- docker/docker-py#3113
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Oct 17, 2023
@setswei
Copy link
Contributor Author

setswei commented Oct 17, 2023

image

Completed Unit Tests

@arm4b
Copy link
Member

arm4b commented Oct 18, 2023

Thanks a lot @setswei for your research and the fix!

We want to remove Ubuntu18 replacing with Ubuntu22 in the next StackStorm v3.9.0 release, so that's perfectly aligned 👍

However I think we have to release a security patch v3.8.1 for stackstorm/st2 core packages anyway (including U18), for those who v3.8.0 already installed in their systems (incl. Mongo).

I guess they could use previous Ansible-st2 version.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

As we're dropping Ubuntu18 in this PR, let's also remove mentions of Ubuntu18 in other places of this repo too.

See: https://github.com/search?q=repo%3AStackStorm%2Fansible-st2%20Ubuntu&type=code

More changes needed in the README, Ansible meta files, Vagrantfile, etc.

@arm4b arm4b changed the title Fix unit tests Fix e2e tests Oct 18, 2023
@setswei
Copy link
Contributor Author

setswei commented Oct 18, 2023

Hey @armab

no problem I will remove all references to ubuntu18. I didn’t do this initially incase it was still going to be supported for a bit.

I will have the updates committed later today

@arm4b
Copy link
Member

arm4b commented Oct 18, 2023

Makes sense!

TBH, I'm still completely not sure if we want to remove it this way.
Alternative per https://www.mongodb.com/community/forums/t/mongo-db-4-0-gpg-key-expired-for-ubuntu-18-04/230854/4 is to use APT instructions like

deb [ arch=amd64 trusted=yes ]

for a bit more until adding a proper U22 support, but that seems to be more hacky in terms of security and official support.

@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines. Requires some effort to review. and removed size/M PR that changes 30-99 lines. Good size to review. labels Oct 19, 2023
@setswei
Copy link
Contributor Author

setswei commented Oct 19, 2023

I have made the changes that you asked for. Users who have already deployed the apt repos would still see errors when talking to the repository due to the expired keys. bypassing the certificates can be a classified as a security risk. We can put some additional notes in the readme about ubuntu 18.04 as this is a issue is not really related to ansible or stackstorm.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

Thanks for the changes!

There are more meta files to update for every Ansible role that we have:

- name: Ubuntu
versions:
- bionic

@setswei
Copy link
Contributor Author

setswei commented Oct 19, 2023

My apologies, ide search fail :P.

@arm4b arm4b changed the title Fix e2e tests Fix e2e tests, drop Ubuntu18 Oct 19, 2023
@arm4b arm4b added breaking change OS support Support/issues/PRs on a specific OS labels Oct 19, 2023
@setswei
Copy link
Contributor Author

setswei commented Oct 19, 2023

the roles meta files have been updated. Builds are running

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

Something that was expected to be a fix became a deprecation of Ubuntu Bionic ;)

Thanks a lot for the contribution!

@setswei
Copy link
Contributor Author

setswei commented Oct 19, 2023

No problem at all. I will see if I can assist with some of the other builds too.

@arm4b arm4b merged commit 8532b96 into StackStorm:master Oct 19, 2023
9 checks passed
@arm4b
Copy link
Member

arm4b commented Oct 19, 2023

Check st2-docker project failures, there might be some dependencies https://github.com/StackStorm/st2-docker/actions/runs/6568617107/job/17843305116#step:6:8 like bats to update. Relevant PR in another repo: StackStorm/stackstorm-k8s#338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change OS support Support/issues/PRs on a specific OS size/L PR that changes 100-499 lines. Requires some effort to review.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants