Skip to content

Conversation

@mike-sul
Copy link
Collaborator

@mike-sul mike-sul commented Jan 9, 2026

No description provided.

Relevant changes:
- fa16c5e fix(compose): validate proxy URL scheme and host
- 53ea2fa fix(compose): improve proxy configuration handling

Signed-off-by: Mike Sul <mike.sul@foundries.io>
- Prevents setting a proxy provider when `pacman.compose_apps_proxy`
  is present but empty in the configuration.
- This change avoids potential runtime errors due to invalid
  proxy configurations.

Signed-off-by: Mike Sul <mike.sul@foundries.io>
- Ensure the proxy URL has a valid scheme (http or https)
- Log an error and skip using proxy if the scheme is unsupported
- Check for an empty host in the proxy URL and log an error if found

Signed-off-by: Mike Sul <mike.sul@foundries.io>
- Introduce a function type for HTTP requests via a proxy
- Replace http.Client with proxyHTTPClient in ProxyProvider
- Update SetClientForProxy to accept the new function type
- Modify getComposeAppProxy to use the function type for requests

This change improves flexibility by allowing different HTTP client
implementations to be used with the proxy, facilitating testing and
customization.

Signed-off-by: Mike Sul <mike.sul@foundries.io>
- Introduce a proxyHandler function in mockHttpOperations to handle
  specific proxy URL requests.
- Add tests for proxy endpoint not found and invalid proxy URL.
- Update createMockConfig and newIntegrationTest to accept proxy
  configuration options.

Signed-off-by: Mike Sul <mike.sul@foundries.io>
- Introduce `STOREROOT` and `COMPOSEROOT` environment variables to
  define the store and project/compose dirs while building `composectl`.

- This change makes the app dirs location in sync with the constants
  defined in the composeapp's test fixtures used by `fioup`,
  specifically `composectl_cmds.go` used for app management.

Signed-off-by: Mike Sul <mike.sul@foundries.io>
- Removed unnecessary app pull and removal operations.
- Streamlined app initialization by using a single slice declaration

Signed-off-by: Mike Sul <mike.sul@foundries.io>
Add a new HTTP server setup to facilitate integration tests
for proxy functionality. This includes starting and stopping
the server, handling HTTP requests, and serving content from
a specified root directory. The server is used in a new test
case to verify fetching applications through a proxy. This
enhancement aims to improve test coverage and reliability
for proxy-related features.

Signed-off-by: Mike Sul <mike.sul@foundries.io>
@mike-sul mike-sul force-pushed the test-for-proxy-case branch from 68457c2 to 8716934 Compare January 9, 2026 17:28
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