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

BUGFIX: ods-deployments file repeats image in mono repository setup #1023

Conversation

serverhorror
Copy link
Contributor

@serverhorror serverhorror commented Jul 24, 2023

This allows us to extract the relevant pod data
in case there are multiple pods in a mono-repo like rollout

fixes #1011

This allows us to extract the relevant pod data
in case there are multiple pods in a mono-repo like rollout

fixes opendevstack#1011
fixes opendevstack#1011
This fixes an issue where the build bails out with:

```text
•	Task :codenarcMain FAILED
FAILURE: Build failed with an exception.
•	V/hat went wrong:
Execution failed for task ':codenarcMain'.
•	BUG! UNCAUGHT EXCEPTION: java.lang.invoke.MethodHandles$Lookup.<init>(java.lang.Class,int)
```
THIS IS AN UNRELATED CHANGE

It fixes:

```
Number of parameters in constructor of class org.ods.orchestration.util.DocumentHistoryEntry exceeds maximum allowed (5).
```
We are now more graceful in what we accept as valid in this test.
@serverhorror serverhorror marked this pull request as ready for review July 25, 2023 08:00
@serverhorror
Copy link
Contributor Author

@gerardcl: do you have a good possibilty to verify this?

I think it should work but I would need to create a mono-repo like component.

@serverhorror
Copy link
Contributor Author

For verification tests, I recommend to have 2 additional helm components:

  • a simple, single resoruce/pod component
  • a mono-repo like component with multiple pods

@@ -11,6 +11,7 @@ class DocumentHistoryEntry implements Map, Serializable {
private final String docVersion
String rational

@SuppressWarnings('ParameterCount')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please not this is unrelated to the actual change, it was reported by codeNarc and I could get it to build without this.

@@ -137,7 +136,7 @@ test {
}

codenarc {
toolVersion = '1.5'
toolVersion = '1.6'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

please note: this is unrelated to the actual changes, it wouldn't let me build without that being set.

@@ -121,7 +121,6 @@ test {
systemProperty 'com.athaydes.spockframework.report.projectName', 'ods-jenkins-shared-library'
systemProperty 'com.athaydes.spockframework.report.projectVersion', version
maxHeapSize = "2048m"
Copy link
Contributor Author

@serverhorror serverhorror Jul 25, 2023

Choose a reason for hiding this comment

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

See the changelog entry, the jvmArgs "-XX:MaxPermSize=256m" option (specifically MaxPermSize) has been deprecated and will prohibit a JVM from starting. It was removed somewhere between 8 and 11, if my research is correct.

This removes the nested closures. The `obj.every { ... }` was incorrect anyway.
This also allows us to test more easily,
as we are not mixing data retrieval and data munging in the same method any more
@serverhorror serverhorror changed the title Adds a check for 'resourceName' BUGFIX: ods-deployments file repeats image in mono repository setup Jul 28, 2023
@serverhorror
Copy link
Contributor Author

@jafarre-bi, @jorge-romero, @hrcornejo -- can you review this?

…in-mono-repository-setup

# Conflicts:
#	src/org/ods/component/HelmDeploymentStrategy.groovy
(cherry picked from commit e4a6fe9)
…in-mono-repository-setup

# Conflicts:
#	CHANGELOG.md
#	src/org/ods/component/HelmDeploymentStrategy.groovy
#	src/org/ods/openshift/OpenShiftResourceMetadata.groovy
@serverhorror
Copy link
Contributor Author

@jafarre-bi, @jorge-romero, @hrcornejo -- can you review this?

1 similar comment
@serverhorror
Copy link
Contributor Author

@jafarre-bi, @jorge-romero, @hrcornejo -- can you review this?

…nts-file-repeats-image-in-mono-repository-setup

# Conflicts:
#	CHANGELOG.md
@jafarre-bi
Copy link
Contributor

Pending testing of the latest changes. Please, @serverhorror, let us know when it's been verified.

…in-mono-repository-setup

# Conflicts:
#	CHANGELOG.md
@hrcornejo
Copy link
Contributor

Please @serverhorror resolve the conflicts in CHANGELOG.md

@hrcornejo hrcornejo self-requested a review April 30, 2024 08:26
@hrcornejo hrcornejo merged commit 61da8e2 into opendevstack:master Apr 30, 2024
2 checks passed
BraisVQ pushed a commit that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ods-deployments file repeats image in mono repository setup
3 participants