Skip to content

Conversation

@butonic
Copy link
Contributor

@butonic butonic commented Dec 2, 2025

This PR moves the ocdav handler back into the frontend. This removes one usage of the go micro service.

@butonic butonic requested a review from rhafer December 2, 2025 15:00
@butonic butonic self-assigned this Dec 2, 2025
@butonic butonic added Type:Maintenance E.g. technical debt, packaging, etc. Type:Breaking-Change labels Dec 2, 2025
@github-project-automation github-project-automation bot moved this to Qualification in OpenCloud Team Board Dec 2, 2025
@butonic butonic force-pushed the ocdav-to-frontent branch 6 times, most recently from a9f558d to 0947bf7 Compare December 5, 2025 09:39
@butonic
Copy link
Contributor Author

butonic commented Dec 5, 2025

it seems reva handles a leading // differently:

  Scenario: send PROPFIND requests to webDav endpoints with 2 slashes using the spaces WebDAV API                                 # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/coreApiAuth/webDavSpecialURLs.feature:155
    When user "Alice" requests these endpoints with "PROPFIND" to get property "d:href" about user "Alice"                        # AuthContext::theUserRequestsTheseEndpointsToGetOrSetPropertyAboutUser()
      | endpoint                                 |
      | //dav//spaces/%spaceid%/textfile1.txt    |
      | /dav//spaces/%spaceid%/PARENT/parent.txt |
      | /dav//spaces/%spaceid%/PARENT            |
      | //dav/spaces//%spaceid%//FOLDER          |
    Then the HTTP status code of responses on each endpoint should be "200,207,207,200" on OpenCloud or "207,207,207,207" on reva # FeatureContext::theHTTPStatusCodeOfResponsesOnEachEndpointShouldBeOcReva()
      Expected HTTP status codes: "200,207,207,200". Found HTTP status codes: "405,207,207,405"
      Failed asserting that false is true.

  Scenario: send PROPPATCH requests to webDav endpoints with 2 slashes                                                 # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/coreApiAuth/webDavSpecialURLs.feature:165
    When user "Alice" requests these endpoints with "PROPPATCH" to set property "d:getlastmodified" about user "Alice" # AuthContext::theUserRequestsTheseEndpointsToGetOrSetPropertyAboutUser()
      | endpoint                                 |
      | //webdav/textfile0.txt                   |
      | //dav//files/%username%/textfile1.txt    |
      | /dav//files/%username%/PARENT/parent.txt |
      | /webdav//PARENT                          |
      | //dav//files/%username%//FOLDER          |
    Then the HTTP status code of responses on each endpoint should be "200,200,400,400,200" respectively               # FeatureContext::theHTTPStatusCodeOfResponsesOnEachEndpointShouldBe()
      Expected HTTP status codes: "200,200,400,400,200". Found HTTP status codes: "405,405,400,400,405"
      Failed asserting that false is true.

@butonic
Copy link
Contributor Author

butonic commented Dec 5, 2025

@ScharfViktor the tests were expecting the wrong status codes. I corrected them and CI should now become green.

@butonic butonic moved this from Qualification to In Progress in OpenCloud Team Board Dec 5, 2025
@butonic butonic requested a review from aduffeck December 8, 2025 09:48
}

type OCDav struct {
Prefix string `yaml:"prefix" env:"OCDAV_HTTP_PREFIX" desc:"A URL path prefix for the handler." introductionVersion:"1.0.0"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we introduce FRONTEND_OCDAV_* variables and deprecate the OCDAV_* ones for consistency?

Copy link
Contributor Author

@butonic butonic Dec 8, 2025

Choose a reason for hiding this comment

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

I would rather aim for dropping the service prefix. @rhafer proposed that and since we are deploying only one process in the compose stack and two or three in the helm chart, I agree. In this case OCDAV_ would match the handler, so I think reusing them is fine.

IIRC @dragonchaser is trying to reduce the number of env vars as well, so he might have an opinion as well.

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type:Breaking-Change Type:Maintenance E.g. technical debt, packaging, etc.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants