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

REGRESSION: 4.x/master - allowPartialRebuild functionality is broken #977

Open
clemensutschig opened this issue Mar 11, 2023 · 3 comments · May be fixed by #979
Open

REGRESSION: 4.x/master - allowPartialRebuild functionality is broken #977

clemensutschig opened this issue Mar 11, 2023 · 3 comments · May be fixed by #979
Assignees
Labels
bug Something isn't working

Comments

@clemensutschig
Copy link
Member

clemensutschig commented Mar 11, 2023

Describe the bug
The release manager allows to configure "allowPartialRebuild" - which is especially helpful for large projects where only one component is changed, and only that one should be rebuild

To Reproduce

  1. New releasemanager
  2. 2 ods components - add both to RM and build (in WIP)
  3. set allowPartialRebuild in metadata.yml -> true
  4. change one component
  5. rebuild the RM in WIP

Expected behavior
only the changed component gets rebuild, the other stays as is - and gets resurrected

Affected version (please complete the following information):

  • OpenDevStack [4.x/master]

Log Output (ensure to remove any confidential information like tokens, project names, etc.

DEBUG: Checking if repo can be resurrected from previous build ...
[Pipeline] fileExists
[..]
[Pipeline] echo
Checking if image SHAs for 'gol' of 1 deployment(s) are up-to-date ...
[Pipeline] echo
DEBUG: Verifying images of DeploymentConfig 'gol'
[Pipeline] sh (Get latest version of DeploymentConfig/gol)
+ oc -n null get DeploymentConfig/gol -o 'jsonpath={.status.latestVersion}'
Error from server (Forbidden): deploymentconfigs.apps.openshift.io "gol" is forbidden: User "system:serviceaccount:dcare-cd:jenkins" cannot get resource "deploymentconfigs" in API group "apps.openshift.io" in the namespace "null"
[Pipeline] echo
DEBUG: DeploymentConfig 'gol' does not exist!
[..]
Resurrection of previous build for 'gol' not possible as deployment 'gol' was not found in OpenShift.
[Pipeline] echo

Note the oc -n null - which makes this break

@clemensutschig clemensutschig added the bug Something isn't working label Mar 11, 2023
@clemensutschig clemensutschig self-assigned this Mar 11, 2023
@clemensutschig
Copy link
Member Author

@metmajer, fyi ..

@clemensutschig
Copy link
Member Author

clemensutschig commented Mar 11, 2023

While fixing this - I took a pretty hard look at the codebase - and propose two things on top of this fix

  • allow ressurection also for ods-service and not just ods /code components
  • remove the "dummy commits" happening for non-ods components, which decreases complexity

I also found some interesting behaviour on unirest / getAsFile -> where the directory must exist - and the only way to make this happen is vie jenkins means (steps.dir)

This was referenced Mar 11, 2023
@clemensutschig clemensutschig changed the title 4.x/master: allowPartialRebuild is broken REGRESSION: 4.x/master - allowPartialRebuild functionality is broken Mar 11, 2023
@clemensutschig
Copy link
Member Author

clemensutschig commented Mar 11, 2023

Fix(es):

DEBUG: Verifiying image of container 'plain' ...
[Pipeline] echo
DEBUG: Container 'plain' is using defined image 'sha256:2ad8c81dc786477d5a84685eb5cba7db7ccb257dd3a010d712b58462443c616d'.
[Pipeline] echo
Resurrection of previous build for 'plain' possible.
[Pipeline] echo
DEBUG: Data from previous Jenkins build:
[resurrectedBuild:test2/41, deployments:[plain:[podName:plain-3-cdnn2, ... dev/plain@sha256:2ad8c81dc786477d5a84685eb5cba7db7ccb257dd3a010d712b58462443c616d]]]]
[Pipeline] echo
DEBUG: [plain-resurrect-data]  (took 19607 ms)

Commits (are not happening anymore on untouched code):
image

vs a rebuild of repos (so forceRebuild):
image

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

Successfully merging a pull request may close this issue.

1 participant