Skip to content

Conversation

@david-iov
Copy link
Collaborator

@david-iov david-iov commented Jul 9, 2025

The changes migrate from a build-time approach (where secrets were passed as Docker build arguments) to a runtime approach where environment variables will be loaded from AWS Parameter Store when the container starts. This is more secure and flexible, allowing environment variables to be updated without rebuilding the Docker image.

@github-actions
Copy link

github-actions bot commented Jul 9, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None


DAO_GRAPH_URL=https://api.studio.thegraph.com/query
DAO_GRAPH_ID=rootstock-collective-governance-subgraph/version/latest
DAO_GRAPH_API_KEY=56839 # This key is for developing purposes only and have limited amount of queries
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should not remove this, this is for local development.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But I'm only setting one env variable in AWS and that is THE_GRAPH_API_KEY. Having both is somewhat confusing, the application should be configured to expect one for each envs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@david-iov each graph implementation is different. TOK has their own implementation. DAO has their own implementation. If you want to unify both envs, which will require more effort, then we will have to setup some sort of plan to do this; and I don't think the scope of this PR is for this.

We can create a ticket to follow up on this; for now let's keep it there.

// IMPORTANT: we don't expose the key to the client
export const fetchCrTheGraphEndpoint = `${process.env.THE_GRAPH_URL}/${process.env.THE_GRAPH_API_KEY}/${process.env.THE_GRAPH_ID}`
export const fetchDaoTheGraphEndpoint = `${process.env.DAO_GRAPH_URL}/${process.env.DAO_GRAPH_API_KEY}/${process.env.DAO_GRAPH_ID}`
export const fetchDaoTheGraphEndpoint = `${process.env.DAO_GRAPH_URL}/${process.env.THE_GRAPH_API_KEY}/${process.env.DAO_GRAPH_ID}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

The DAO will have its own key, unless that @Freshenext know something that I dont know.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I only set THE_GRAPH_API_KEY in AWS.

Copy link
Contributor

Choose a reason for hiding this comment

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

@david-iov please bring it up with both DAO and TOK as we may end up using different keys (it depends on the expected number of requests)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess I'd leave both variable for now and also add the DAO_GRAPH_API_KEY in AWS, and we can discuss this in another scope.

@jurajpiar jurajpiar added the collective-rewards PRs that touch CR parts label Jul 16, 2025
@antomor antomor added devops PRs that require Devops attention collective-rewards PRs that touch CR parts dao PRs made by DAO team and removed collective-rewards PRs that touch CR parts labels Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

collective-rewards PRs that touch CR parts dao PRs made by DAO team devops PRs that require Devops attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants