Skip to content

Extract internal/creconfig for CLI config paths#463

Merged
timothyF95 merged 10 commits into
mainfrom
DEVSVCS-5162/refactor-cliconfig
Jun 3, 2026
Merged

Extract internal/creconfig for CLI config paths#463
timothyF95 merged 10 commits into
mainfrom
DEVSVCS-5162/refactor-cliconfig

Conversation

@timothyF95
Copy link
Copy Markdown
Contributor

Summary

  • Add internal/creconfig as the single owner of CLI config directory paths
  • Migrate credentials, tenantctx, templateconfig, templaterepo/cache, update, telemetry, and related cmd/tests
  • Remove duplicated .cre path helpers from credentials
  • Use OS-correct paths in runtime feedback (FilePathHint); keep relative paths in static help/docs

@timothyF95 timothyF95 changed the title Devsvcs 5162/refactor cliconfig Extract internal/creconfig for CLI config paths Jun 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

⚠️ Abigen Fork Check - Update Available

The forked abigen package is outdated and may be missing important updates.

Version Value
Current Fork ``
Latest Upstream v1.17.3

Action Required

  1. Review abigen changes in upstream (only the accounts/abi/bind directory matters)
  2. Compare with our fork in cmd/generate-bindings/bindings/abigen/
  3. If relevant changes exist, sync them and update FORK_METADATA.md
  4. If no abigen changes, just update the version in FORK_METADATA.md to v1.17.3

⚠️ Potential Security-Related Commits Detected

  • p2p/nat: bump pion/stun to v3 to pull in fixed pion/dtls (#34980) (link)
  • build: upgrade -dlgo version to Go 1.25.10 (#34911) (link)

Files to Review

  • cmd/generate-bindings/bindings/abigen/bind.go
  • cmd/generate-bindings/bindings/abigen/bindv2.go
  • cmd/generate-bindings/bindings/abigen/template.go

⚠️ Note to PR author: This is not something you need to fix. The Platform Expansion team is responsible for maintaining the abigen fork.

cc @smartcontractkit/bix-framework

@timothyF95 timothyF95 marked this pull request as ready for review June 2, 2026 17:42
@timothyF95 timothyF95 requested a review from a team as a code owner June 2, 2026 17:42
Comment thread cmd/logout/logout_test.go
t.Helper()
dir := filepath.Join(home, credentials.ConfigDir)
if err := os.MkdirAll(dir, 0o700); err != nil {
dir, err := creconfig.EnsureDir()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we name the variable and function a bit more explicit? It looks quite generic now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

IMO this does encapsulate precisely what it is. We have created a new package with specific ownership over your cre configuration creconfig which is in your home directory EnsureDir makes sure the directory exists. I did consider calling it something similar to creglobalconfig but we may want to extend this in the future to be split between global and local in a similar way that git differentiates between the two. Do you have any ideas of how we could make it more explicit?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we could name the dir -> creConfigDir?

Comment thread docs/cre_templates_add.md Outdated
Comment thread internal/creconfig/creconfig.go
Comment thread internal/creconfig/creconfig.go Outdated
Comment thread internal/creconfig/creconfig.go Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

⚠️ Abigen Fork Check - Update Available

The forked abigen package is outdated and may be missing important updates.

Version Value
Current Fork ``
Latest Upstream v1.17.3

Action Required

  1. Review abigen changes in upstream (only the accounts/abi/bind directory matters)
  2. Compare with our fork in cmd/generate-bindings/bindings/abigen/
  3. If relevant changes exist, sync them and update FORK_METADATA.md
  4. If no abigen changes, just update the version in FORK_METADATA.md to v1.17.3

⚠️ Potential Security-Related Commits Detected

  • p2p/nat: bump pion/stun to v3 to pull in fixed pion/dtls (#34980) (link)
  • build: upgrade -dlgo version to Go 1.25.10 (#34911) (link)

Files to Review

  • cmd/generate-bindings/bindings/abigen/bind.go
  • cmd/generate-bindings/bindings/abigen/bindv2.go
  • cmd/generate-bindings/bindings/abigen/template.go

⚠️ Note to PR author: This is not something you need to fix. The Platform Expansion team is responsible for maintaining the abigen fork.

cc @smartcontractkit/bix-framework

@timothyF95 timothyF95 requested a review from j-nowak June 3, 2026 14:15
@timothyF95 timothyF95 added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit 82b3441 Jun 3, 2026
22 checks passed
@timothyF95 timothyF95 deleted the DEVSVCS-5162/refactor-cliconfig branch June 3, 2026 15:58
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