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

Clean up filename and required ignition version templates #40

Closed

Conversation

paul-griffith
Copy link
Contributor

Fixes #37
Fixes #38

@brianeray
Copy link
Collaborator

Hey @paul-griffith. Is this PR still alive? I can review if needed.

And get a clean build; looks like the logs are gone.

@paul-griffith
Copy link
Contributor Author

Haven't touched it in a long time, obviously, but I think the changes are still valid.

@brianeray brianeray self-requested a review March 4, 2024 17:35
Copy link
Collaborator

@brianeray brianeray left a comment

Choose a reason for hiding this comment

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

I'm going to see if I can manually kick off the GH workflow again to find out why it failed the last time.

generator/README.md Outdated Show resolved Hide resolved
generator/generator-core/README.md Outdated Show resolved Hide resolved
paul-griffith and others added 2 commits March 11, 2024 09:05
Co-authored-by: Brian Ray <brianeray@users.noreply.github.com>
Co-authored-by: Brian Ray <brianeray@users.noreply.github.com>
brianeray
brianeray previously approved these changes Mar 16, 2024
@brianeray
Copy link
Collaborator

I don't have privileges to override the checks failure and merge, which is what I would do since these aren't code changes. I might need to bug the inductiveautomation org owners.

@KathyApplebaum
Copy link

@brianeray Just stumbled across this. Can you explain to me in simple terms why it's okay to merge with a failed build? Thanks!

@brianeray
Copy link
Collaborator

brianeray commented Jul 31, 2024

No. Looking at this again, especially this,

what I would do since these aren't code changes

README.md's, OK, perhaps even the changes to the templates. But there's a logic change in ModuleGeneratorContext. What I wrote makes no sense.

This thing should pass a PR build first.

@brianeray
Copy link
Collaborator

Trying to get to the PR build failure yields a dead end:

image

The PR workflow has succeeded for other PRs since then, however. This is weird.

The old PR GH Actions failures are a mystery, because their logs are
gone. Trying to trigger another run to capture the actual failure.
@brianeray
Copy link
Collaborator

OK I finally tricked it into rebuilding and giving us good output. I've downloaded the failed Gradle log and finally have something to go on.

Stay tuned.

@brianeray
Copy link
Collaborator

For internal tracking: IGN-10603.

@brianeray
Copy link
Collaborator

brianeray commented Aug 15, 2024

@paul-griffith I think I figured it out. It's coming from the current PR. Try this.

> git diff --% --ignore-all-space --color-moved --color-moved-ws=ignore-all-space --
diff --git before:generator/generator-core/src/main/resources/templates/config/modlPluginConfig.groovy after:generator/generator-core/src/main/resources/templates/config/modlPluginC
onfig.groovy
index d2ca25a..22eb18e 100644
--- before:generator/generator-core/src/main/resources/templates/config/modlPluginConfig.groovy
+++ after:generator/generator-core/src/main/resources/templates/config/modlPluginConfig.groovy
@@ -22,7 +22,7 @@ ignitionModule {
      * the course of a major Ignition (7.9, 8.0, etc) version, except for when the Ignition Platform adds/changes APIs
      * used by the module.
      */
-    requiredIgnitionVersion = ext.sdk_version
+    requiredIgnitionVersion = rootProject.ext.sdk_version
     /*
      *  This is a map of String: String, where the 'key' represents the fully qualified path to the project
      *  (using gradle path syntax), and the value is the shorthand Scope string.
diff --git before:generator/generator-core/src/main/resources/templates/config/modlPluginConfig.kts after:generator/generator-core/src/main/resources/templates/config/modlPluginConf
ig.kts
index 176d0db..83122e5 100644
--- before:generator/generator-core/src/main/resources/templates/config/modlPluginConfig.kts
+++ after:generator/generator-core/src/main/resources/templates/config/modlPluginConfig.kts
@@ -25,7 +25,7 @@ ignitionModule {
      * the course of a major Ignition (7.9, 8.0, etc) version, except for when the Ignition Platform adds/changes APIs
      * used by the module.
      */
-    requiredIgnitionVersion.set(sdk_version)
+    requiredIgnitionVersion.set(rootProject.ext.sdk_version)
     /*
      *  This is a map of String: String, where the 'key' represents the fully qualified path to the project
      *  (using gradle path syntax), and the value is the shorthand Scope string.

I'm having problems getting unit tests to pass even after that patch due to Gradle-Windows fighting, but am pretty sure this squashes the thing that is tanking most of the unit tests. This is the kind of test failure up in that build log over and over and over.

io.ia.sdk.gradle.modl.IgnitionModulePluginFunctionalTest > gateway scoped unsigned module passes config and builds with signing credentials STANDARD_OUT
    /tmp/junit5484288864958444835/gwScopedUnsignedConfigAndBuild

    FAILURE: 
    Build failed with an exception.


    * Where:

    Build file '/tmp/junit5484288864958444835/gwScopedUnsignedConfigAndBuild/great-tests/build.gradle' line: 46


    * What went wrong:

    A problem occurred evaluating root project 'great-tests'.

    > 
    Cannot get property 'sdk_version' on extra properties extension as it does not exist

@brianeray
Copy link
Collaborator

I'm having problems getting unit tests to pass even after that patch due to Gradle-Windows fighting

OK this is better; I'm not going to run the whole suite locally but it gives confidence in the sdk_version patch.

> .\gradlew.bat --% :gradle-module-plugin:functionalTest --tests=AssembleModuleStructureTest."single file doc is collected"
Type-safe project accessors is an incubating feature.

 ...

BUILD SUCCESSFUL in 1m 20s
12 actionable tasks: 3 executed, 9 up-to-date

@brianeray
Copy link
Collaborator

Replaced by #58--just to make it easier for me to grind away at the unit test failures and take this off of Paul's plate.

@brianeray brianeray closed this Aug 27, 2024
@paul-griffith paul-griffith deleted the copy-fixups branch August 28, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants