Stream: dev

Topic: Dataverse Action JVM Options


view this post on Zulip Jan Range (Apr 16 2025 at 10:03):

I am currently setting up the Dataverse Action to support S3 backends. Everything is functioning as expected, the storage change works.

However, I am encountering an issue when including JVM options in the action's tests, as they appear to have no effect. For example, I have set the localstack backend's min-part-size to a lower value (see here) and then verified whether multipart URLs are generated (see here). Instead, I am receiving only a single-part URL, which is not the desired outcome.

I have confirmed that the same JVM option works correctly when tested outside of the action by adding it to the compose file. Does anyone have any suggestions on how to resolve this issue (@Oliver Bertuch @Philip Durbin โ˜€๏ธ )? I am not entirely confident in the MicroProfile approach used here.

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 10:57):

Are you trying to change the JVM option on the fly? I don't think that's supported. I think you need to add it next to the other "localstack1" options like you do here in the compose file.

view this post on Zulip Jan Range (Apr 16 2025 at 11:01):

@Oliver Bertuch has set up a part of the workflow that utilizes a trick to ingest JVM options:

https://github.com/gdcc/dataverse-action/blob/a579da737db2e4cdbf6f37467b115be4875eb976/action.yml#L70-L77

But if this does not work, I'd like to have a way to parametrize the min-part-size of LocalStack. Or do you think it is fine to hard-coding it to a reasonable size?

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 11:48):

Interesting. Have you confirmed the approach works?

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 11:49):

The "We use the MicroProfile Config Source trick of reading properties from a directory" approach, that is.

view this post on Zulip Jan Range (Apr 16 2025 at 11:50):

I suspect it is not working because the partSize coming back in my test does not reflect the one specified in the action JVM options parameter.

view this post on Zulip Jan Range (Apr 16 2025 at 11:52):

@Oliver Bertuch has set this up and looking at the link it seems like a valid approach. I am not sure, though, if this is a mutually exclusive case (env JVM options vs the trick)

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 12:04):

Right but maybe you could set the version or something. Some random setting just to make sure it's working.

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 12:09):

I think it's dataverse.version from the code. Or we could pick something else.

view this post on Zulip Jan Range (Apr 16 2025 at 12:10):

Sounds good, what does it do, and how can I check it? Is it the typical info/version one?

view this post on Zulip Jan Range (Apr 16 2025 at 12:32):

I went for a more radical test and excluded all the localstack JVM options and used them as input to the action. Although the localstack service is up, the tests are failing and do not recognize the storage driver. I'd conclude that the method does not work unfortunately :frown:

Action Run --> https://github.com/JR-1991/dataverse-action/actions/runs/14492676895
Action Test --> https://github.com/JR-1991/dataverse-action/blob/test-action-input/.github/workflows/test-action.yml
Compose --> https://github.com/JR-1991/dataverse-action/blob/test-action-input/docker-compose.yml

view this post on Zulip Jan Range (Apr 16 2025 at 12:34):

Since this is not working as expected, I would like to choose a hard-coded solution for now and provide a minimum part size of around 10 MB to test the multi-part direct upload. I believe this should be fine. What do you think?

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 13:03):

Yes, the typical api/info/version

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 13:04):

Sure, hard-coded 10 MB sounds good.

view this post on Zulip Jan Range (Apr 16 2025 at 13:04):

Is it possible to define multiple backends for the same service? Something along the lines of a storage backend with a bigger size and one with a smaller size.

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 16 2025 at 13:07):

Yep, should work.


Last updated: Nov 01 2025 at 14:11 UTC