Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update goss #1680

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Update goss #1680

wants to merge 19 commits into from

Conversation

sivchari
Copy link
Member

@sivchari sivchari commented Feb 5, 2025

Change description

Updated goss version and correct release url

Related issues

Additional context

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 5, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign averagemarcus for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 5, 2025
@sivchari sivchari force-pushed the update-goss branch 2 times, most recently from b251e8e to 49253ec Compare February 5, 2025 09:20
@sivchari
Copy link
Member Author

sivchari commented Feb 7, 2025

/test ?

@k8s-ci-robot
Copy link
Contributor

@sivchari: The following commands are available to trigger required jobs:

/test json-sort-check
/test pull-azure-vhds
/test pull-gcp-all
/test pull-goss-populate
/test pull-lint
/test pull-packer-validate

The following commands are available to trigger optional jobs:

/test pull-azure-sigs
/test pull-container-image-build

Use /test all to run the following jobs that were automatically triggered:

json-sort-check
pull-azure-vhds
pull-gcp-all
pull-goss-populate
pull-packer-validate

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sivchari
Copy link
Member Author

sivchari commented Feb 7, 2025

/test pull-azure-vhds
/test pull-gcp-all

@sivchari
Copy link
Member Author

sivchari commented Feb 7, 2025

I don't know why this CI is broken

{
  "error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "errors": [
      {
        "message": "Login Required.",
        "domain": "global",
        "reason": "required",
        "location": "Authorization",
        "locationType": "header"
      }
    ],
    "status": "UNAUTHENTICATED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "CREDENTIALS_MISSING",
        "domain": "googleapis.com",
        "metadata": {
          "method": "compute.v1.ImagesService.Get",
          "service": "compute.googleapis.com"
        }
      }
    ]
  }
}

Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
@AverageMarcus
Copy link
Member

Looking at the GCP failure I can see there are actually 3 goss failures, e.g.:


�[0;32m    googlecompute.rhel-8:         {�[0m
�[0;32m    googlecompute.rhel-8:             "duration": 50860,�[0m
�[0;32m    googlecompute.rhel-8:             "end-time": "2025-02-07T08:07:02.273884965Z",�[0m
�[0;32m    googlecompute.rhel-8:             "err": null,�[0m
�[0;32m    googlecompute.rhel-8:             "matcher-result": {�[0m
�[0;32m    googlecompute.rhel-8:                 "actual": [�[0m
�[0;32m    googlecompute.rhel-8:                     "1.31.4-150500.1.1"�[0m
�[0;32m    googlecompute.rhel-8:                 ],�[0m
�[0;32m    googlecompute.rhel-8:                 "expected": [�[0m
�[0;32m    googlecompute.rhel-8:                     {�[0m
�[0;32m    googlecompute.rhel-8:                         "contain-element": {�[0m
�[0;32m    googlecompute.rhel-8:                             "match-regexp": "^\\Q1.31.4-1.1\\E$"�[0m
�[0;32m    googlecompute.rhel-8:                         }�[0m
�[0;32m    googlecompute.rhel-8:                     },�[0m
�[0;32m    googlecompute.rhel-8:                     {�[0m
�[0;32m    googlecompute.rhel-8:                         "contain-element": {�[0m
�[0;32m    googlecompute.rhel-8:                             "match-regexp": "^\\Q1.31.4\\E$"�[0m
�[0;32m    googlecompute.rhel-8:                         }�[0m
�[0;32m    googlecompute.rhel-8:                     }�[0m
�[0;32m    googlecompute.rhel-8:                 ],�[0m
�[0;32m    googlecompute.rhel-8:                 "extra-elements": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "found-elements": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "message": "to satisfy at least one of these matchers",�[0m
�[0;32m    googlecompute.rhel-8:                 "missing-elements": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "transform-chain": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "untransformed-value": null�[0m
�[0;32m    googlecompute.rhel-8:             },�[0m
�[0;32m    googlecompute.rhel-8:             "meta": null,�[0m
�[0;32m    googlecompute.rhel-8:             "property": "version",�[0m
�[0;32m    googlecompute.rhel-8:             "resource-id": "kubectl",�[0m
�[0;32m    googlecompute.rhel-8:             "resource-type": "Package",�[0m
�[0;32m    googlecompute.rhel-8:             "result": 1,�[0m
�[0;32m    googlecompute.rhel-8:             "skipped": false,�[0m
�[0;32m    googlecompute.rhel-8:             "start-time": "2025-02-07T08:07:02.273834127Z",�[0m
�[0;32m    googlecompute.rhel-8:             "successful": false,�[0m
�[0;32m    googlecompute.rhel-8:             "summary-line": "Package: kubectl: version:\nExpected\n    [\"1.31.4-150500.1.1\"]\nto satisfy at least one of these matchers\n    [{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4-1.1\\\\E$\"}},{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4\\\\E$\"}}]",�[0m
�[0;32m    googlecompute.rhel-8:             "summary-line-compact": "Package: kubectl: version: Expected [\"1.31.4-150500.1.1\"] to satisfy at least one of these matchers [{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4-1.1\\\\E$\"}},{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4\\\\E$\"}}]",�[0m
�[0;32m    googlecompute.rhel-8:             "title": ""�[0m
�[0;32m    googlecompute.rhel-8:         },�[0m

Search for successful": false in the build-log.txt.

I don't understand why those are failing with this change though.

I suspect something has changed in Goss that now makes this fail but not sure what or when exactly.

I wonder if it might make sense to first update to the latest v0.3.23 and then another to update to v0.4.xx?

Signed-off-by: sivchari <[email protected]>
@sivchari
Copy link
Member Author

sivchari commented Feb 7, 2025

@AverageMarcus
Yeah, I've confirmed the goss's 3 failures, too, but I don't know the way to resolve it.
As you can said, I try to upgrade to v0.3.23 before upgrading v4.x.x 👍

@sivchari
Copy link
Member Author

sivchari commented Feb 7, 2025

All test are passed, so the minor upgradeing affects something.

Signed-off-by: sivchari <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 8, 2025
@sivchari
Copy link
Member Author

sivchari commented Feb 8, 2025

==> googlecompute.ubuntu-2004: panic: interface conversion: interface {} is nil, not float64

Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
@sivchari
Copy link
Member Author

sivchari commented Feb 8, 2025

[0;32m    googlecompute.rhel-8:             "matcher-result": {�[0m
�[0;32m    googlecompute.rhel-8:                 "actual": [�[0m
�[0;32m    googlecompute.rhel-8:                     "1.31.4-150500.1.1"�[0m
�[0;32m    googlecompute.rhel-8:                 ],�[0m
�[0;32m    googlecompute.rhel-8:                 "expected": [�[0m
�[0;32m    googlecompute.rhel-8:                     {�[0m
�[0;32m    googlecompute.rhel-8:                         "contain-element": {�[0m
�[0;32m    googlecompute.rhel-8:                             "match-regexp": "^\\Q1.31.4-1.1\\E$"�[0m
�[0;32m    googlecompute.rhel-8:                         }�[0m
�[0;32m    googlecompute.rhel-8:                     },�[0m
�[0;32m    googlecompute.rhel-8:                     {�[0m
�[0;32m    googlecompute.rhel-8:                         "contain-element": {�[0m
�[0;32m    googlecompute.rhel-8:                             "match-regexp": "^\\Q1.31.4\\E$"�[0m
�[0;32m    googlecompute.rhel-8:                         }�[0m
�[0;32m    googlecompute.rhel-8:                     }�[0m
�[0;32m    googlecompute.rhel-8:                 ],�[0m
�[0;32m    googlecompute.rhel-8:                 "extra-elements": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "found-elements": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "message": "to satisfy at least one of these matchers",�[0m
�[0;32m    googlecompute.rhel-8:                 "missing-elements": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "transform-chain": null,�[0m
�[0;32m    googlecompute.rhel-8:                 "untransformed-value": null�[0m
�[0;32m    googlecompute.rhel-8:             },�[0m
�[0;32m    googlecompute.rhel-8:             "meta": null,�[0m
�[0;32m    googlecompute.rhel-8:             "property": "version",�[0m
�[0;32m    googlecompute.rhel-8:             "resource-id": "kubelet",�[0m
�[0;32m    googlecompute.rhel-8:             "resource-type": "Package",�[0m
�[0;32m    googlecompute.rhel-8:             "result": 1,�[0m
�[0;32m    googlecompute.rhel-8:             "skipped": false,�[0m
�[0;32m    googlecompute.rhel-8:             "start-time": "2025-02-08T12:23:51.126282065Z",�[0m
�[0;32m    googlecompute.rhel-8:             "successful": false,�[0m
�[0;32m    googlecompute.rhel-8:             "summary-line": "Package: kubelet: version:\nExpected\n    [\"1.31.4-150500.1.1\"]\nto satisfy at least one of these matchers\n    [{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4-1.1\\\\E$\"}},{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4\\\\E$\"}}]",�[0m
�[0;32m    googlecompute.rhel-8:             "summary-line-compact": "Package: kubelet: version: Expected [\"1.31.4-150500.1.1\"] to satisfy at least one of these matchers [{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4-1.1\\\\E$\"}},{\"contain-element\":{\"match-regexp\":\"^\\\\Q1.31.4\\\\E$\"}}]",�[0m

Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
@sivchari
Copy link
Member Author

sivchari commented Feb 8, 2025

/retest

@AverageMarcus
Copy link
Member

Looks like just need to fix Goss running on Windows now:

�[1;31m==> azure-arm.vhd-windows-2022-containerd: This version of C:\tmp\goss-0.4.9-windows-amd64.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.�[0m

Logs

@AverageMarcus
Copy link
Member

�[0;32m    azure-arm.vhd-windows-2022-containerd: Installing Goss from, https://github.com/goss-org/goss/releases/download/v0.4.9/goss-alpha-windows-amd64.exe�[0m

🤔 That's not the correct path. The alpha is no longer needed.

@AverageMarcus
Copy link
Member

ah-ha! I think we need to remove all the references to GOSS_USE_ALPHA now.

@sivchari
Copy link
Member Author

@AverageMarcus
So thanks !!!! I tried to turn GOSS_USE_ALPHA disabled.

Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
Signed-off-by: sivchari <[email protected]>
@sivchari
Copy link
Member Author

I totally understand why the test must be failed when the version is v0.4.0 later.

https://github.com/YaleUniversity/packer-plugin-goss/blob/master/provisioner/goss/packer-provisioner-goss.go#L144

This line check if the goss is alpha. Then, when the OS is windows, we required GOSS_USE_ALPHA = 1 to run the render and other command. But after v0.4.x, the alpha is trimmed from windows binary name, so the provision is must be failed when the GOSS_USE_ALPHA=1 since the applicable release is not found.
Thus, from now on, the test hasn't never been passed.
To resolve this problem, I'd open the PR.

@k8s-ci-robot
Copy link
Contributor

@sivchari: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-azure-sigs 62f26ea link false /test pull-azure-sigs
pull-azure-vhds 156348a link true /test pull-azure-vhds

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@sivchari
Copy link
Member Author

ref: YaleUniversity/packer-plugin-goss#106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update goss serverspec tool to current version
3 participants