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

Fix bump-golang job failing to update Dockerfiles. #36234

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

cmacknz
Copy link
Member

@cmacknz cmacknz commented Aug 3, 2023

Use the dockerfile resource type to ensure we can parse and update Dockerfiles that use multistage builds.

We need to handle FROM golang:x.x.x AS yyyyy in addition to the simple FROM golang:x.x.x case.

The dockerfile resource type unfortunately doesn't support of list of files so there is now significantly more duplication, but it works and will keep working.

I used this configuration to create #36233 by manually running updatecli with my changes.

Use the dockerfile resource type to ensure we can parse and update
Dockerfiles that use multistage builds.

We need to handle FROM golang:x.x.x AS yyyyy in addition to the simple
FROM golang:x.x.x case.

The dockerfile resource type unfortunately doesn't support of list of
files so there is now significantly more duplication, but it works and
will keep working.
@cmacknz cmacknz requested a review from v1v August 3, 2023 21:19
@cmacknz cmacknz requested a review from a team as a code owner August 3, 2023 21:19
@cmacknz cmacknz self-assigned this Aug 3, 2023
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label Team:Automation Label for the Observability productivity team and removed needs_team Indicates that the issue/PR needs a Team:* label labels Aug 3, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 3, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @cmacknz? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label Aug 3, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-08-03T21:20:01.444+0000

  • Duration: 14 min 19 sec

Test stats 🧪

Test Results
Failed 0
Passed 3
Skipped 0
Total 3

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

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

I think I've tested it after my last changes, I'm surprised to see if failing now. Perhaps something changed in the UpdateCLI command?

@cmacknz
Copy link
Member Author

cmacknz commented Aug 4, 2023

The first failure with this error was 3 weeks ago from what I can see 🤷 https://github.com/elastic/beats/actions/runs/5563958617/job/15069810162

@cmacknz cmacknz merged commit 5d84caf into elastic:main Aug 4, 2023
5 checks passed
@cmacknz cmacknz deleted the fix-golang-version-bump branch August 4, 2023 14:29
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
Use the [dockerfile resource
type](https://www.updatecli.io/docs/plugins/resource/dockerfile/) to
ensure we can parse and update Dockerfiles that use multistage builds.

We need to handle FROM golang:x.x.x AS yyyyy in addition to the simple
FROM golang:x.x.x case.

The dockerfile resource type unfortunately doesn't support of list of
files so there is now significantly more duplication, but it works and
will keep working.

I used this configuration to create
elastic#36233 by manually running
updatecli with my changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Automation Label for the Observability productivity team Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants