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

[DPE-5830] Bump to 24.04 #495

Merged
merged 36 commits into from
Dec 19, 2024
Merged

[DPE-5830] Bump to 24.04 #495

merged 36 commits into from
Dec 19, 2024

Conversation

reneradoi
Copy link
Contributor

@reneradoi reneradoi commented Oct 28, 2024

Update CI pipeline to enable 24.04 support.

Change list:

  • charmcraft.yaml uses charmcraftst124 syntax to enable building on multiple bases
  • Charm now uses bin commands exposed though the snap: opensearch.<bin-command>
  • tmpfiles are now created inside the snap folders so the snap commands are able to access them
  • small fixes and additions on unit tests
  • update juju version that fixes storage and websockets issues

TODO:
After this PR, some tasks will need addressing:

@zmraul zmraul changed the title bump to 24.04 [DPE-5830] Bump to 24.04 Nov 13, 2024
@zmraul zmraul marked this pull request as ready for review December 9, 2024 09:35
@@ -79,7 +79,7 @@ def __init__(
self.peer_relation = peer_relation
self.jdk_path = jdk_path
self.certs_path = certs_path
self.keytool = self.jdk_path + "/bin/keytool"
self.keytool = "opensearch.keytool"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that change and that this is now provided by the snap!

@@ -114,10 +114,11 @@ jobs:
path:
- .
- ./tests/integration/relations/opensearch_provider/application-charm/
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v22.0.0
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@beta-charmcraftst124
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe add some # todo comments here?

Copy link
Contributor

Choose a reason for hiding this comment

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

The big "TODO" is on charmcraft.yaml explaining why all of this is needed. Once we generally update how charmcraft is done, all of this other places will be forced to change by necessity.

Comment on lines +550 to +552
with tempfile.NamedTemporaryFile(
mode="w+t", dir=self.charm.opensearch.paths.conf
) as ca_tmp_file:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 good change. Just for consideration: there is also a self.charm.opensearch.paths.certs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I was between that one or conf. I think either way is fine since the files disappear once close() is called.

# should not be updated unless https://github.com/juju/python-libjuju/issues/1093 is fixed
juju = "==3.5.0"
# websockets issue solved from 3.2.5.1 https://github.com/juju/python-libjuju/issues/1184 # TODO: restore to 3.5.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice to see this fixed.

Copy link
Contributor

@phvalguima phvalguima left a comment

Choose a reason for hiding this comment

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

I think, in terms of changes, it seems okay. Covers the distro module and fixes the calls to our plugins or keytool. What I expect to see before given a final +1:

  • CI passes on all tests -> only exceptions I would consider here are test_storage, which is a bit flaky; and lib check
  • A ticket explicitly highlighting we need to go back and revisit the TODOs of this PR. Assign this ticket to yourself for this pulse. Keep it in "blocked" and list what we need to have so we can unblock


def run_script(self, script_name: str, args: str = None):
"""Run script provided by Opensearch in another directory, relative to OPENSEARCH_HOME."""
script_path = f"{self.paths.home}/{script_name}"
if not os.access(script_path, os.X_OK):
self._run_cmd(f"chmod a+x {script_path}")

self._run_cmd(f"{script_path}", args)
self._run_cmd(f"snap run --shell opensearch.daemon -- {script_path}", args)
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, makes a lot of sense to run these scripts under the snap context. TBH we only use this logic here.

Copy link
Contributor

@phvalguima phvalguima left a comment

Choose a reason for hiding this comment

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

After discussions with @zmraul, there is an ongoing issue with charmcraft and the test application charm: canonical/charmcraft#2055

Both moving the CI to 24.04 and updating opensearch CI once the charmcraft issue above has been fixed have been reported in the following respective tickets:

We can move forward with this PR, aware the relations/test_opensearch_provider.py will not be passing for the time being.

@zmraul zmraul merged commit 51bd955 into 2/edge Dec 19, 2024
39 of 42 checks passed
@zmraul zmraul deleted the bump_to_24_04 branch December 19, 2024 15:02
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.

Parsing of storage constraints fails
3 participants