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

feat: remove peer relation and improve integration tests #2

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

jedel1043
Copy link
Collaborator

@jedel1043 jedel1043 commented Dec 17, 2024

Addresses the review comments about the charm and the library.

  • Removes the peer relation data in favor of a single unified autofs mounts file.
  • Renames everything to be a bit more consistent with the "filesystem" prefix.
  • Reworks client to only allow a single filesystem provider.

Since the previous integrations tests were too tied to the implementation, this replaces them with decoupled tests that only assert that the client can access remote files from the servers.

@jedel1043 jedel1043 added the enhancement New feature or request label Dec 17, 2024
@jedel1043 jedel1043 force-pushed the no-peers branch 7 times, most recently from aac1ee2 to b977b35 Compare December 18, 2024 01:38
wolsen
wolsen previously requested changes Dec 18, 2024
Copy link
Member

@wolsen wolsen left a comment

Choose a reason for hiding this comment

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

Looking good! A few inline comments please.

charmcraft.yaml Outdated Show resolved Hide resolved
charmcraft.yaml Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/utils/manager.py Show resolved Hide resolved
src/utils/manager.py Outdated Show resolved Hide resolved
@jedel1043 jedel1043 requested a review from wolsen December 19, 2024 01:45
@jedel1043 jedel1043 force-pushed the no-peers branch 2 times, most recently from 49dcec6 to 2227bf6 Compare December 19, 2024 01:47
Copy link
Member

@NucciTheBoss NucciTheBoss left a comment

Choose a reason for hiding this comment

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

Looking pretty darn good 🤩

Just some suggested revisions around type annotations and other implementation bits. One thing I noticed is that some functions/methods don't have an annotation if they return None. E.g. the function/method doesn't have a return statement. Generally I include the -> None since it quickly signifies that there's no special sauce we expect in return when reading source code.

Another thing is that I believe we possibly had an agreement that log, exception, and unit/application messages would follow the Go convention where it's all lowercase, and messages are not postfixed with a period. It's the style we follow in slurm_ops. I say I believe because I remember we talked about it in a PR for slurm_ops, but we didn't write it down anywhere 😅

Let me know if you have any questions!

src/charm.py Outdated Show resolved Hide resolved
src/utils/manager.py Show resolved Hide resolved
src/utils/manager.py Outdated Show resolved Hide resolved
src/utils/manager.py Outdated Show resolved Hide resolved
src/utils/manager.py Outdated Show resolved Hide resolved
charmcraft.yaml Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
@NucciTheBoss
Copy link
Member

Also, wanted to mention in writing from our discussion yesterday that I agree that we should look at making a monorepo with the proxy-operators include so that we don't have to create a "meta" charm within the integration tests and can just test directly against the proxies.

@jedel1043
Copy link
Collaborator Author

Another thing is that I believe we possibly had an agreement that log, exception, and unit/application messages would follow the Go convention where it's all lowercase, and messages are not postfixed with a period. It's the style we follow in slurm_ops. I say I believe because I remember we talked about it in a PR for slurm_ops, but we didn't write it down anywhere 😅

I think it was on charmed-hpc/hpc-libs#13 (comment), but the justification for that was the nice display of errors if they're lowercase (Error: message instead of Error: Message). For log messages and exceptions I completely agree, but for status messages Juju doesn't append anything behind the message, so it's better style to begin those in uppercase.

This avoids having big diffs when bumping the version of charm libs.
@jedel1043 jedel1043 force-pushed the no-peers branch 2 times, most recently from 9d36b7f to 5d27fb5 Compare December 20, 2024 18:03
@NucciTheBoss
Copy link
Member

I think it was on charmed-hpc/hpc-libs#13 (comment), but the justification for that was the nice display of errors if they're lowercase (Error: message instead of Error: Message). For log messages and exceptions I completely agree, but for status messages Juju doesn't append anything behind the message, so it's better style to begin those in uppercase.

This is an agreeable path forward for me. We'll need to do a deeper UX drive as we get closer to the Plucky release, but we'll hold off for after midcycle to really deep dive on how the charms should look and feel.

Copy link
Member

@NucciTheBoss NucciTheBoss left a comment

Choose a reason for hiding this comment

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

LGTM! Excellent work :shipit:

@NucciTheBoss NucciTheBoss dismissed wolsen’s stale review December 20, 2024 18:41

All suggestions were addressed/implemented. Dismissing because even though all conversations were resolved, GitHub seems to be having a cache issue somewhere that is preventing me from rebasing and merging this PR.

@NucciTheBoss NucciTheBoss merged commit ebf6a8e into charmed-hpc:main Dec 20, 2024
5 checks passed
@jedel1043 jedel1043 deleted the no-peers branch December 20, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants