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 components permissions on build #1716

Merged
merged 2 commits into from
Nov 14, 2022

Conversation

michalpristas
Copy link
Contributor

What does this PR do?

Endpoint and fleet server permissions were incorrectly set.
This PR fixes that to be 755 instead of 660

This PR also makes EXTERNAL true by default so each dependency is fetched on build for packaging when using mage dev:package
EXTERNAL is not set when EXTERNAL was already provided or DROP PATH is used.

When using EXTERNAL all dependencies (incl fleet-server, apm, endpoint) are fetched compared to the list of beats from beats repo when used without this flag. This is to be as close to CI package as possible.

Why is it important?

Fixes: #1712

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

@michalpristas michalpristas added the bug Something isn't working label Nov 14, 2022
@michalpristas michalpristas self-assigned this Nov 14, 2022
@michalpristas michalpristas requested a review from a team as a code owner November 14, 2022 10:53
@michalpristas michalpristas requested review from aleksmaus and michel-laterman and removed request for a team November 14, 2022 10:53
@mergify
Copy link
Contributor

mergify bot commented Nov 14, 2022

This pull request does not have a backport label. Could you fix it @michalpristas? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

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

NOTE: backport-skip has been added to this pull request.

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 14, 2022

💔 Tests Failed

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: 2022-11-14T15:54:28.405+0000

  • Duration: 45 min 55 sec

Test stats 🧪

Test Results
Failed 2
Passed 4479
Skipped 13
Total 4494

Test errors 2

Expand to view the tests failures

Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestToComponents/Complex_w/_shipper – github.com/elastic/elastic-agent/pkg/component
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestToComponents/Complex_w/_shipper
        component_test.go:1504: 
            	Error Trace:	component_test.go:1504
            	Error:      	Not equal: 
            	            	expected: []component.Unit{component.Unit{ID:"filestream-default", Type:0, LogLevel:2, Config:(*proto.UnitExpectedConfig)(0xc000280120), Err:error(nil)}, component.Unit{ID:"log-default", Type:0, LogLevel:2, Config:(*proto.UnitExpectedConfig)(0xc0002801b0), Err:error(nil)}, component.Unit{ID:"shipper-default", Type:1, LogLevel:2, Config:(*proto.UnitExpectedConfig)(0xc000280240), Err:error(nil)}}
            	            	actual  : []component.Unit{component.Unit{ID:"filestream-default", Type:0, LogLevel:2, Config:(*proto.UnitExpectedConfig)(0xc0003bbd40), Err:error(nil)}, component.Unit{ID:"log-default", Type:0, LogLevel:2, Config:(*proto.UnitExpectedConfig)(0xc0003bbc20), Err:error(nil)}, component.Unit{ID:"shipper-default", Type:1, LogLevel:2, Config:(*proto.UnitExpectedConfig)(0xc0003bbe60), Err:error(nil)}}
            	            	
            	            	Diff:
            	Test:       	TestToComponents/Complex_w/_shipper
        --- FAIL: TestToComponents/Complex_w/_shipper (0.02s)
     
    

Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestToComponents – github.com/elastic/elastic-agent/pkg/component
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestToComponents
    --- FAIL: TestToComponents (0.39s)
     
    

Steps errors 3

Expand to view the steps failures

Go package
  • Took 22 min 25 sec . View more details here
  • Description: mage package ironbank
Go unitTest
  • Took 2 min 23 sec . View more details here
  • Description: mage unitTest
Checks if running on a Unix-like node
  • Took 0 min 0 sec . View more details here
  • Description: script returned exit code 1

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 2

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestToComponents/Complex_w/_shipper – github.com/elastic/elastic-agent/pkg/component
  • Name: Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestToComponents – github.com/elastic/elastic-agent/pkg/component

🤖 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.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

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

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 14, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.305% (58/59) 👍
Files 71.066% (140/197) 👍
Classes 70.557% (266/377) 👍
Methods 54.834% (794/1448) 👍
Lines 40.292% (8573/21277) 👍 0.009
Conditionals 100.0% (0/0) 💚

@michalpristas
Copy link
Contributor Author

Jenkins test this please

@michalpristas
Copy link
Contributor Author

Jenkins test this please

@michalpristas michalpristas merged commit 8eb334a into elastic:main Nov 14, 2022
@michalpristas
Copy link
Contributor Author

test failures not related

dependencies := []string{
"auditbeat", "filebeat", "heartbeat", "metricbeat", "osquerybeat", "packetbeat", // beat dependencies
"apm-server",
// "cloudbeat", // TODO: add once working
Copy link

Choose a reason for hiding this comment

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

Cloudbeat v2 alignment was done here.
Anything else we need to do to remove this comment?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think there is anything blocking inclusion of Cloudbeat here, easiest fix is for you to submit a PR :)

@oren-zohar oren-zohar mentioned this pull request Dec 5, 2022
7 tasks
pierrehilbert added a commit that referenced this pull request Aug 1, 2023
## What does this PR do?
Adding cloudbeat to external flow, only supports `linux/amd64` and
`linux/arm64`

Following [this
comment](#1716 (comment))
by @cmacknz


## Why is it important?

Will improve dev flow for cloudbeat team

## Checklist

- [x] My code follows the style guidelines of this project
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have made corresponding change to the default configuration
files
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added an entry in `CHANGELOG.next.asciidoc` or
`CHANGELOG-developer.next.asciidoc`.

## Author's Checklist

- [ ] tested with #1908

## Related issues

- Requires #1908

---------

Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V2: fleet-server is packaged without execute permissions
5 participants