Skip to content

Fix/separate app stack settings#50

Merged
abarciauskas-bgse merged 6 commits intodevelopfrom
fix/separate-app-stack-settings
May 23, 2025
Merged

Fix/separate app stack settings#50
abarciauskas-bgse merged 6 commits intodevelopfrom
fix/separate-app-stack-settings

Conversation

@abarciauskas-bgse
Copy link
Copy Markdown
Contributor

Add root_path and veda_custom_host to replicate developmentseed/titiler-multidim#87

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 23, 2025

📚 Documentation preview will be available at: https://developmentseed.github.io/titiler-cmr/pr-previews/pr-50/

Status: ✅ Preview is ready!

github-actions bot pushed a commit that referenced this pull request May 23, 2025
github-actions bot pushed a commit that referenced this pull request May 23, 2025
github-actions bot pushed a commit that referenced this pull request May 23, 2025
github-actions bot pushed a commit that referenced this pull request May 23, 2025
@abarciauskas-bgse abarciauskas-bgse requested a review from hrodmn May 23, 2025 15:55
@abarciauskas-bgse
Copy link
Copy Markdown
Contributor Author

I have verified this is now working via this tile request and visiting the API docs landing page.

It does seem a bit duplicative that TITILER_CMR_ROOT_PATH is defined by AppSettings in infrastructure/aws/config.py in order to be passed as an environment variable to the lambda run time for use ApiSettings in titiler/cmr/main.py but I haven't thought of a better way to pass environment variables between the stack deployment and the app run time...

Copy link
Copy Markdown
Contributor

@hrodmn hrodmn left a comment

Choose a reason for hiding this comment

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

It does seem a bit duplicative that TITILER_CMR_ROOT_PATH is defined by AppSettings in infrastructure/aws/config.py in order to be passed as an environment variable to the lambda run time for use ApiSettings in titiler/cmr/main.py but I haven't thought of a better way to pass environment variables between the stack deployment and the app run time...

Agreed. The number of variable handoffs is a little out of control especially when you go all the way up to the veda-deploy level! I did not try experimenting with the whole custom host and root path situation when I did this in titiler-multidim - I just followed some example from a different veda service.

I guess we could eliminate the infrastructure AppSettings and just load things directly from env vars at deploy time, but the pydantic settings are a convenient interface for validation and defining defaults. I think we are stuck with the env var -> settings in the titiler-cmr application since we don't compile the app to encode these variables in the runtime.

@abarciauskas-bgse abarciauskas-bgse merged commit 8d48632 into develop May 23, 2025
6 checks passed
@abarciauskas-bgse abarciauskas-bgse deleted the fix/separate-app-stack-settings branch May 23, 2025 17:00
github-actions bot pushed a commit that referenced this pull request May 23, 2025
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