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

Support multiple templates in config entries #4282

Merged
merged 4 commits into from
Oct 30, 2023

Conversation

glpatcern
Copy link
Member

This PR introduces support for config entries with multiple templates, such as parameter = "{{ vars.v1 }} foo {{ vars.v2 }}".
Previously, only one {{ template }} was allowed in a given configuration entry.

@update-docs
Copy link

update-docs bot commented Oct 25, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@glpatcern
Copy link
Member Author

Not sure why integration tests fail, especially as the logs show 500 Internal Server errors. The specific test for configuration templates was extended and passes.

@gmgigi96
Copy link
Member

@glpatcern Try to run it locally. You will have also the reva logs to understand why. Just type make [litmus-1|litmus-2|acceptance-2]

@glpatcern
Copy link
Member Author

For the record, to be looked at:

The reva gateway panics in the litmus-1 scenario in storageprovider.go:1338, i.e.:

if etagIface, err := s.etagCache.Get(statRes.Info.Owner.OpaqueId + ":" + statRes.Info.Path); err == nil {

Relevant stack trace:

        /usr/local/go/src/runtime/panic.go:914 +0x21f
github.com/cs3org/reva/internal/grpc/services/gateway.(*svc).statHome(0xc000000f00, {0x172f008, 0xc0008afda0})
        /home/reva/internal/grpc/services/gateway/storageprovider.go:1338 +0x19b
github.com/cs3org/reva/internal/grpc/services/gateway.(*svc).Stat(0xc0008af8c0?, {0x172f008, 0xc0008afda0}, 0xc00071f860)
        /home/reva/internal/grpc/services/gateway/storageprovider.go:1500 +0xd70

@glpatcern glpatcern force-pushed the config-templ branch 2 times, most recently from 3da9dd4 to 1620ff3 Compare October 27, 2023 18:32
@glpatcern
Copy link
Member Author

Somehow surprisingly, fixing a flaw in the logic (a not found key should not be replaced) fixed all the scenarios.

The PR is ready for review.

@gmgigi96 gmgigi96 merged commit 783c0c5 into cs3org:master Oct 30, 2023
24 checks passed
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.

2 participants