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

Atomic avu handling (main) #65

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

FifthPotato
Copy link
Contributor

Primary code mostly appears to work as expected, but can't get the test to stick. Calling it through the microservice seems to bypass policy (at least, I think) and I'm not sure if we can use the python client in tests. At a bit of a loss on how to properly test it with just icommands...

@trel
Copy link
Member

trel commented Jan 9, 2024

fair. i don't think icommands have a binary that hits this API endpoint. we expose it via PRC... and yes, the microservice is already 'in the server', so wouldn't hit a PEP.

@trel
Copy link
Member

trel commented Jan 9, 2024

and perhaps a run through clang-format? i see some long lines.

@korydraughn
Copy link
Collaborator

We're going to have to provide another mechanism for testing the atomic PEP. Creating a dependency on the PRC seems like the easiest path forward.

@trel
Copy link
Member

trel commented Jan 9, 2024

agreed, for now.

CMakeLists.txt Outdated Show resolved Hide resolved
@alanking
Copy link
Contributor

Is this in draft because we are waiting on something? Please mark as ready for review when ready. Thanks

Copy link
Collaborator

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Do the tests pass? What's left for this?

src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
@FifthPotato FifthPotato marked this pull request as ready for review January 19, 2024 14:29
Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

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

Most of my comments are related to code readability. Approach seems sound.

packaging/test_rule_engine_plugin_metadata_guard.py Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Found a few more things.

src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
irods_consortium_continuous_integration_test_hook.py Outdated Show resolved Hide resolved
Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

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

Getting there...

src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Show resolved Hide resolved
@trel
Copy link
Member

trel commented Jan 25, 2024

please mark conversations as resolved/done when they are resolved/done. it's so close...

Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

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

Lookin real nice, yep. Noticed one thing that I missed before, again, if I'm reading things properly. :)

src/main.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@alanking alanking 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 we are ready for some squashing, no #s yet.

@alanking alanking changed the title Atomic avu handling Atomic avu handling (main) Jan 26, 2024
Copy link
Collaborator

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Looking real good. Found a few more things.

src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
src/main.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

This is looking really good.

src/main.cpp Outdated Show resolved Hide resolved
@FifthPotato
Copy link
Contributor Author

I think I got it all. Did I miss anything?

@korydraughn
Copy link
Collaborator

Have you run all the plugin tests (i.e. the new ones and the old ones) to see if everything is passing?

If not, please do so and post a comment letting us know if they passed or failed. We'll do one more pass over the PR while that's happening.

Copy link
Collaborator

@korydraughn korydraughn 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 we're in a good spot.

Will wait for test results before approving.

Good job!

@FifthPotato
Copy link
Contributor Author

Yep, I've run them, and both old&new pass.
This will also potentially require PRC to be added to the testing environment dockerfiles, methinks.

@alanking
Copy link
Contributor

This will also potentially require PRC to be added to the testing environment dockerfiles, methinks.

Please create an issue for this and maybe link to this PR: https://github.com/irods/irods_testing_environment Thanks!

@korydraughn
Copy link
Collaborator

Can the test hook install the PRC?
Is it weird to install python modules from a python script?

@alanking Who launches the test hook in the testing environment? root or irods?

@alanking
Copy link
Contributor

Yeah, root runs the test hook in the testing environment now. A user with sudo access should run the test hook as they frequently install packages using the package manager and configure/run external services.

We install Minio packages via pip in the test hook for the S3 resource plugin. Not sure if it's weird, but there is precedent.

@korydraughn
Copy link
Collaborator

Good.

@FifthPotato Let's start with making the test hook install the PRC. I imagine it shouldn't take no more than one or two lines of code.

@FifthPotato FifthPotato force-pushed the atomic_avu_handling_draft.m branch 2 times, most recently from 37d9dfb to 702a76b Compare February 1, 2024 17:16
@korydraughn
Copy link
Collaborator

You could include issue 42 as well since it's marked as a duplicate of 38?

@korydraughn
Copy link
Collaborator

Please add an empty line between the main commit message and the lines that act as the body. For example:

[38,42] Primary commit message / Summary.

Body.

@FifthPotato FifthPotato force-pushed the atomic_avu_handling_draft.m branch 2 times, most recently from 321b06f to c95ec72 Compare February 1, 2024 17:25
@FifthPotato
Copy link
Contributor Author

Okay, messed with it until the commit msg doesn't get cut off, and put the rest into the body. Numbers added, too.

Copy link
Collaborator

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Excellent! Pound it.

No spaces after the comma in the square brackets (i.e. [#38,#42]).

metadata_guard now properly accounts for atomic metadata operations. Added unit tests, which use PRC.
@FifthPotato FifthPotato force-pushed the atomic_avu_handling_draft.m branch from c95ec72 to 92b99f5 Compare February 1, 2024 17:38
@FifthPotato
Copy link
Contributor Author

Octothorpe'd

@alanking alanking merged commit 6d9ce70 into irods:main Feb 1, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants