Packer 1.12.0-alpha1 testing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu với các binary phát hành của Packer 1.12.0-alpha1 và 1.11.2, Go module của plugin và nhánh SDK grpc_base được mô tả trong issue. Chạy bốn kịch bản được yêu cầu bằng cách sử dụng các thư mục plugin tách biệt và các lệnh PACKER_PLUGIN_PATH, PACKER_LOG và PACKER_FORCE_GOB đã cung cấp. Hoàn tất có nghĩa là ghi lại các kết quả tương thích thành công và báo cáo mọi lựa chọn protocol ngoài dự kiến hoặc lỗi build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi, your friend Packer maintainer here!
I am opening this issue as a follow-up to the github.com/zclconf/go-cty breaking change issue we opened on Packer Plugin SDK last year. With this upcoming release, we are starting to tackle phase 2 of this issue, with some changes compared to the original plan.
We are not going to migrate to go-plugin now, and instead introduced a way for Packer to toggle between the use of Gob or Protobuf/msgpack for all its over-the-wire communication. This change does not apply to communicators, which will continue to use gob for over-the-wire communication.
With the alpha we released last week, Packer now behaves like the following:
- During plugin discovery, it will look for a new
"protocol_version":"v2"attribute in the returneddescribeoutput for a plugin binary. - If the
"protocol_version":"v2"attribute is not present, Packer will fallback into compatibility mode and use Gob for communication between Packer and plugins. - Assuming all the plugins discovered support
"protocol_version":"v2", Protobuf/msgpack will be used for communication between Packer and plugins.
This behavior can be disabled with a PACKER_FORCE_GOB environment variable, allowing for an escape hatch if a build is blocked because of a bug in that new code that handles protobuf/msgpack serialization.
What it means for plugins
This change should be as transparent as possible for you as plugin developers, and for our users. There will however be one change to make in the plugin's code, namely updating the SDK to the upcoming 0.6.0 release. The release date of 0.6.0 has not yet been determined.
Right now, the code that manages this protobuf/msgpack logic is stored in a grpc_base branch. Apologies for the name, it is not representative of the objective anymore.
Before we can consider releasing this version of Packer, and a version of the SDK, we'd love to get help from you.
Our requests
As we move to support both protocols, we need you to perform a couple tests with your plugin to ensure we maintain compatibility for your supported configurations.
We've prepared a series of steps that we'd like you to run on your code, alongside Packer 1.12.0-alpha1, which you can get from our releases page.
Once you have Packer 1.12.0-alpha1 setup, we'd ask that try the following scenarios on templates of your choice.
Ideally, these tests should be run in a plugin directory that is not your normal one, to avoid Packer discovering plugins that force it to go into compatibility (i.e. Gob) mode.
Scenario 1 - Packer 1.12.0-alpha1 + plugin latest released version
In this scenario, you should expect Packer to use Gob for serialization, as the latest plugin is not (by our assumption) compatible with protobuf/msgpack yet. This is the baseline test, to ensure Packer 1.12.0 still works with your plugin.
If you do not have one, this will also help you get a base working template that relies solely on your plugin and, maybe, Packer's embedded components.
Note: this point is crucial as none of the existing plugin releases support both serialization formats, and so will mandate Packer to run in compatibility mode.
Scenario 2 - Packer 1.12.0-alpha1 + plugin custom build with protobuf/msgpack support
This scenario will require you to bump your dependency on the packer-plugin-sdk to use grpc_base instead of a current release.
You can do this with the following commands for example:
$ go get -v github.com/hashicorp/packer-plugin-sdk@grpc_base && go mod tidy
When this is done, you can compile the plugin, and install it in your test plugin directory.
$ PACKER_PLUGIN_PATH=<test-plugin directory> packer plugins install --path compiled-plugin-binary github.com/org/name
This will need to be the highest compatible version with your plugin in order for Packer to prioritize it, and use protobuf/msgpack for communication.
In order to know for sure if Packer used protobuf for communication, you can take a peek at the verbose logs, where you should encounter a log that points to this.
$ PACKER_PLUGIN_PATH=<test-plugin directory> PACKER_LOG=1 packer build <template> 2>&1 | grep 'Using protobuf for communication with plugins'
This sample command should highlight that Packer uses the expected protocol for communicating. If the build uses Gob, this means that the logic failed, and we may need to do some troubleshooting to understand what happened. In this case please let us know by responding to this issue, and we'll be in contact to sort this out.
Scenario 3 - Packer 1.12.0-alpha1 + plugin custom build with protobuf/msgpack support, with PACKER_FORCE_GOB=1.
As a follow-up to scenario 2, we want to ensure that the code handling the logic for switching protocols works if a fallback is requested by a user.
The overall process is similar, the only difference you can expect is that the grep returns nothing instead of the line in the logs that reports protobuf being used.
$ PACKER_PLUGIN_PATH=<test-plugin directory> PACKER_FORCE_GOB=1 PACKER_LOG=1 packer build <template> 2>&1 | grep 'Using protobuf for communication with plugins'
Scenario 4 - Packer 1.11.2 (latest release) with protobuf compatible plugin
This one is more of a sanity test that ensures your plugin remains compatible with older versions of Packer. If you haven't already please download the latest official Packer 1.11.2 release from the releases page. We expect this one to succeed at all times, but we'd like to be as sure as we can before we release 😃
Conclusion
This is overall a small update to Packer core, and hopefully a small enough change that it will be easy to roll into your codebase, which paves the way for us to later remove our dependency on @nywilken's go-cty fork down the road.
We are aiming to release this in the coming months, and we're hoping we can squash as many bugs as we can before then so this doesn't impact real-life user workflows.
Thank you for your continued support!
- Ngôn ngữ chính
- Go
- Star
- 29
- Fork
- 27
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hashicorp/packer-plugin-openstack
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Error initializing block storage client with Openstack 2026.1Có thể đã có người làm @elelaysh đã nhận 72 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
hashicorp/packer-plugin-openstack#162 · 1 bình luận ·
-
Feature Request: Add keep_volume option to preserve boot volume artifacts in OpenStack builderĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
hashicorp/packer-plugin-openstack#151 · 1 bình luận · 1 reaction ·
-
Response Error: No image found with ID .... code 404 Not Found title Not Found (Floating problem )Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
hashicorp/packer-plugin-openstack#130 · 1 bình luận ·
-
enhancement good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
hashicorp/packer-plugin-openstack#116 · 2 bình luận ·
Tất cả issue của hashicorp/packer-plugin-openstack
Issue tương tự
-
enhancement needs:sonnet ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/TypeScript#65370 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: data-ownership invites vendors to build add-ons around the OSCó thể đã có người làm @brandli đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
gentian-org/gentian-os#894 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug tech debt testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/amazon-vpc-cni-k8s#3976 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug raised-by:desk
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
medici-finance/assay#5678 ·
Maintainer thường phản hồi trong vòng 1 ngày