ServiceNow / sncicd-publish-app

MIT License
8 stars 7 forks source link

sncicd-publish-app 2.0.0 not detecting the correct application version #20

Closed ramyaramdasan closed 3 years ago

ramyaramdasan commented 3 years ago

Hi,

I have encountered an issue after upgrading sncicd-publish-app action in the pipeline from 1.2.0 to 2.0.0. Please find the changes made to the yaml highlighted below:

Before:

After:

Pasting a screenshot of the error here. The current version is 11.4.0 and I's trying to publish 11.5.0. However the action detects 11.5.0 as current version. image

Thanks Ramya

chiarng commented 3 years ago

@ramyaramdasan can you confirm that the app repo doesn't already have 11.5.0 in it? otherwise i'm assuming that your dev instance has 11.5.0, it's committed to Source Control, and now we're trying to publish 11.5.0 while the app repo has 11.4.0 as latest?

ramyaramdasan commented 3 years ago

Hi @chiarnglin,

App Repo has 11.3.0 as latest. I got the error when I tried with 11.4.0 and same error for a second attempt with 11.5.0.

As of now, DPP dev instance (905) has 11.5.0, it's committed to Source Control, and trying to publish 11.5.0 while the app repo has 11.3.0 as latest. Hope this helps.

image

chiarng commented 3 years ago

Thank you @ramyaramdasan, our dev has found the bug, we'll make a fix for it!

chiarng commented 3 years ago

@ramyaramdasan Sorry about the troubles, but try v2.0.1 now! https://github.com/ServiceNow/sncicd-publish-app/releases/tag/2.0.1

chiarng commented 3 years ago

Also there's a new feature "incrementBy" parameter that defaults to 0 and allows you to set any integer value for incrementing, so you're not stuck with either 0 or 1 anymore!

ramyaramdasan commented 3 years ago

@chiarnglin , thanks for the quick fix. It works now. There is a minor issue with outputs though, both rollback and new versions are set to same value.

image

Thanks Ramya

chiarng commented 3 years ago

@ramyaramdasan Hi Ramya, Thanks for bringing this up! I'm trying to remember why we have rollbackVersion in publish-app Action though. The rollback context is set on the instance being installed onto, and I see that the install-app Action has the output for rollbackVersion, which makes sense. What is the use case for rollbackVersion in the publish-app Action? Thanks for reminding me, Chiarng

ramyaramdasan commented 3 years ago

Hi Chiarng (@chiarnglin),

Yes, we use the rollbackVersion output in install-app action. I was closely watching the logs during first pipeline execution with publish-app 2.0,1, and came across this line. While it didn't impact anything, I thought of bringing it to your notice.

Thanks Ramya

chiarng commented 3 years ago

Thanks Ramya, Hmm. If anything, this sounds like a feature that needs to be deprecated, because I can't think of a use case for a rollbackVersion in publish-app, especially if it's the wrong version.. In any case for now, I'll table this, we can observe if anyone else has an actual use case for it! -Chiarng