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

feat: add more detailed init timings in build timeline#20503

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
Emyrk merged 13 commits intomainfromstevenmasley/build_timeline_init
Oct 28, 2025

Conversation

@Emyrk
Copy link
Member

@EmyrkEmyrk commentedOct 27, 2025
edited
Loading

What this does

This uses theterraform init -json logs to add more visibility into theinit phase ofplan. Theinit logs omitms precision, so we have to usetime.Now() 😢

Open TF PR:hashicorp/terraform#37818

Screencast.From.2025-10-27.12-38-33.webm

Follow up will be to add more details tomodules andproviders to single out each module/provider loaded.

@EmyrkEmyrk changed the titlefeat: more detailed init timings in build timelinefeat: add more detailed init timings in build timelineOct 27, 2025
@EmyrkEmyrk marked this pull request as ready for reviewOctober 28, 2025 15:08
// resourceName maps init message codes to human-readable resource names.
// This is purely for better readability in the timing spans.
resourceName=map[initMessageCode]string{
initInitializingBackendMessage:"Backend",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you stick to the existing naming convention which is all lowercase?
Also I think we need to be more explicit about the stages. What does "Backend" mean?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Made it lowercase 👍

I agreebackend is an unfortunate name, but it is the proper TF term.

https://developer.hashicorp.com/terraform/language/backend

For Coder,backend means thetfstate file. That is it.
This timing would likely be longer if you were using an aws s3 backend for instance.

Copy link
Contributor

Choose a reason for hiding this comment

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

image

We should maybe try add a help section explaining what it is.

Emyrk reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I want to spend time on the build timeline in the UI more. I would like it to also go 1 more hierarchical depth.

Will defer to future work on that though

// The combination of resource and provider names MUST be unique across entries.
func (e*timingSpan)hashByState(state proto.TimingState)uint64 {
id:=fmt.Sprintf("%s:%s:%s:%s:%s",e.kind.Category(),state.String(),e.action,e.resource,e.provider)
ife.messageCode!="" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we probably need to make this a slice and join with the delimiter.

Emyrk reacted with thumbs up emoji
@EmyrkEmyrk merged commit924afb7 intomainOct 28, 2025
48 of 51 checks passed
@EmyrkEmyrk deleted the stevenmasley/build_timeline_init branchOctober 28, 2025 20:47
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 28, 2025
Comment on lines +31 to +34
var (
version170=version.Must(version.NewVersion("1.7.0"))
version190=version.Must(version.NewVersion("1.9.0"))
)
Copy link
Member

@matifalimatifaliOct 29, 2025
edited
Loading

Choose a reason for hiding this comment

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

Terraform versions below 1.12 are already EOL. We also bundle Terraform in the official image. We may not need to worry about supporting older versions.
https://endoflife.date/terraform

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We should update our minimum supported then.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I will make a PR

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@matifalimatifalimatifali left review comments

@dannykoppingdannykoppingdannykopping approved these changes

Assignees

@EmyrkEmyrk

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@Emyrk@dannykopping@matifali

[8]ページ先頭

©2009-2025 Movatter.jp