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

[BUG] Only send -d to core components, instead of everything. #1651

Closed
peterzhuamazon opened this issue Feb 18, 2022 · 6 comments · Fixed by #1652
Closed

[BUG] Only send -d to core components, instead of everything. #1651

peterzhuamazon opened this issue Feb 18, 2022 · 6 comments · Fixed by #1652
Assignees
Labels
bug Something isn't working cicd rpm

Comments

@peterzhuamazon
Copy link
Member

As of now, build workflow will not send -d if user does not specify --distribution.
However, if user specify things such as --distribution rpm and try to build core+all plugins,
-d will be sent to plugins as well.

The plugin build script does not know how to interpret -d thus fail.

+ echo 'Invalid option: -?'
Invalid option: -?
+ exit 1
2022-02-17 23:58:36 ERROR    Error building common-utils, retry with: ./build.sh manifests/1.3.0/opensearch-1.3.0.yml --component common-utils
Traceback (most recent call last):
  File "./src/run_build.py", line 79, in <module>
    sys.exit(main())
  File "./src/run_build.py", line 67, in main
    builder.build(build_recorder)
  File "/local/home/zhujiaxi/opensearch-build-peterzhuamazon/src/build_workflow/builder_from_source.py", line 49, in build
    self.git_repo.execute(build_command)
  File "/local/home/zhujiaxi/opensearch-build-peterzhuamazon/src/git/git_repository.py", line 83, in execute
    subprocess.check_call(command, cwd=cwd, shell=True)
  File "/usr/lib64/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bash /local/home/zhujiaxi/opensearch-build-peterzhuamazon/scripts/components/common-utils/build.sh -v 1.3.0 -p linux -a x64 -d rpm -s false -o builds' returned non-zero exit status 1.

Need to add a condition where if component != OpenSearch/OpenSearch-Dashboards, then -d will not be sent even if not None.

@peterzhuamazon peterzhuamazon self-assigned this Feb 18, 2022
@peterzhuamazon peterzhuamazon changed the title [BUG] Only send -d to specific components, instead of everything. [BUG] Only send -d to core components, instead of everything. Feb 18, 2022
@dblock
Copy link
Member

dblock commented Feb 18, 2022

Need to add a condition where if component != OpenSearch/OpenSearch-Dashboards, then -d will not be sent even if not None.

That's too bad. Maybe it's easier to just add required -d into all the scripts?

@peterzhuamazon
Copy link
Member Author

Need to add a condition where if component != OpenSearch/OpenSearch-Dashboards, then -d will not be sent even if not None.

That's too bad. Maybe it's easier to just add required -d into all the scripts?

The previous discussion on this is to not adding -d to all scripts.
I am happy to do so just wonder is there any process changed for this?

I already open PR #1652 to add this functionality, please comment.

Thanks.

@dblock
Copy link
Member

dblock commented Feb 18, 2022

Need to add a condition where if component != OpenSearch/OpenSearch-Dashboards, then -d will not be sent even if not None.

That's too bad. Maybe it's easier to just add required -d into all the scripts?

The previous discussion on this is to not adding -d to all scripts. I am happy to do so just wonder is there any process changed for this?

Yes, I didn't realize that it was going to be a problem and would require this hack :(

@peterzhuamazon
Copy link
Member Author

Need to add a condition where if component != OpenSearch/OpenSearch-Dashboards, then -d will not be sent even if not None.

That's too bad. Maybe it's easier to just add required -d into all the scripts?

The previous discussion on this is to not adding -d to all scripts. I am happy to do so just wonder is there any process changed for this?

Yes, I didn't realize that it was going to be a problem and would require this hack :(

Is there any reason this hack wont be able to proceed at this point?
It is very time consuming to change all the scripts for this, granted some live in build repo some dont.
Can we get the hack in for now so we can unblock, then come back and fix later?

cc: @bbarani

@dblock
Copy link
Member

dblock commented Feb 18, 2022

That's fine with me. Open a separate issue for that.

@peterzhuamazon
Copy link
Member Author

@dblock create a new issue to track this: #1655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cicd rpm
Projects
None yet
2 participants