Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: track terraform modules in telemetry#15450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugodutka merged 34 commits intomainfromhugodutka/track-workspace-modules
Nov 16, 2024
Merged
Changes from1 commit
Commits
Show all changes
34 commits
Select commitHold shift + click to select a range
0f713ed
add the workspace_modules table, add the module column to workspace_r…
hugodutkaNov 6, 2024
82c8a3c
insert workspace modules on provisioner job completion
hugodutkaNov 6, 2024
307a57e
add foreign key to job on workspace_modules
hugodutkaNov 6, 2024
2ae16fc
don't return the root module
hugodutkaNov 7, 2024
7f2f155
add and populate the module_path column to workspace_resources
hugodutkaNov 7, 2024
863235d
TestCompleteJob - Modules WIP
hugodutkaNov 7, 2024
993f0ab
TemplateImport CompleteJob Modules test
hugodutkaNov 8, 2024
e8fbd40
TestCompleteJob Modules WorkspaceBuild
hugodutkaNov 8, 2024
5c542e5
add a test for returning modules in provision_test.go, fix test in re…
hugodutkaNov 8, 2024
9ec5ee1
make gen
hugodutkaNov 8, 2024
119a686
fix dbauthz tests
hugodutkaNov 8, 2024
3a5a025
add workspace modules and workspace resources's ModulePath to telemetry
hugodutkaNov 8, 2024
3377d22
add a workspace_modules fixture
hugodutkaNov 8, 2024
422b112
add a workspace resource's modulePath default to the e2e helper
hugodutkaNov 8, 2024
46b9b36
add modules default on PlanComplete for e2e tests
hugodutkaNov 8, 2024
f3f4d5c
lint
hugodutkaNov 8, 2024
93ed136
set module path to sentinel value when parsing failed and log an error
hugodutkaNov 13, 2024
301a153
change error string
hugodutkaNov 13, 2024
212e7d5
obfuscate workspace module source and version
hugodutkaNov 13, 2024
e9b7c46
fixes after rebase
hugodutkaNov 14, 2024
25cba6d
change migration number
hugodutkaNov 15, 2024
780730f
change fixture number
hugodutkaNov 15, 2024
b47a018
add index on created_at
hugodutkaNov 15, 2024
03be52e
add a comment about using modules from plan instead of apply
hugodutkaNov 15, 2024
00b8131
convert sentinel string to an error
hugodutkaNov 15, 2024
4187fbf
remove unnecessary comment
hugodutkaNov 15, 2024
7e82c3d
don't fail if we can't get modules from disk
hugodutkaNov 15, 2024
42e57ca
add a test for a malformed module
hugodutkaNov 16, 2024
368fc25
add a comment
hugodutkaNov 16, 2024
73b22cf
combine assignment and conditional
hugodutkaNov 16, 2024
7b9d70a
make isCoderModule into a top level function
hugodutkaNov 16, 2024
ea82313
use dbtestutil.NewDB instead of dbmem
hugodutkaNov 16, 2024
8564e9a
make gen
hugodutkaNov 16, 2024
d11fc82
combine 2 more assignments and conditionals
hugodutkaNov 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
make isCoderModule into a top level function
  • Loading branch information
@hugodutka
hugodutka committedNov 16, 2024
commit7b9d70aa3e37754a75d585da99508827a84dc21c
7 changes: 5 additions & 2 deletionscoderd/telemetry/telemetry.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -676,11 +676,14 @@ func ConvertWorkspaceResourceMetadata(metadata database.WorkspaceResourceMetadat
}
}

func shouldSendRawModuleSource(source string) bool {
return strings.Contains(source, "registry.coder.com")
}

func ConvertWorkspaceModule(module database.WorkspaceModule) WorkspaceModule {
isCoderModule := strings.Contains(module.Source, "registry.coder.com")
source := module.Source
version := module.Version
if !isCoderModule {
if !shouldSendRawModuleSource(source) {
source = fmt.Sprintf("%x", sha256.Sum256([]byte(source)))
version = fmt.Sprintf("%x", sha256.Sum256([]byte(version)))
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp