Skip to content

Conversation

@blag
Copy link
Contributor

@blag blag commented Jul 5, 2021

GHA CI is failing because our release scripts insert single quotes instead of double quotes:

sed -i -e "s/\(__version__ = \).*/\1'${VERSION}'/" ${INIT_FILE}
#                                   ^          ^

But black forces us to use double quotes:

================== black-check ====================

# st2 components
===========================================================
Running black on st2actions
===========================================================
would reformat /home/runner/work/st2/st2/st2actions/st2actions/__init__.py
Oh no! 💥 💔 💥
1 file would be reformatted, 59 files would be left unchanged.
make: *** [Makefile:372: .black-check] Error 1
Script done, file is typescript
Error: Process completed with exit code 2.

Running black manually:

diff --git a/st2actions/st2actions/__init__.py b/st2actions/st2actions/__init__.py
index 2e5ec8277..18f4135fa 100644
--- a/st2actions/st2actions/__init__.py
+++ b/st2actions/st2actions/__init__.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-__version__ = '3.6dev'
+__version__ = "3.6dev"
diff --git a/st2api/st2api/__init__.py b/st2api/st2api/__init__.py
index 2e5ec8277..18f4135fa 100644
--- a/st2api/st2api/__init__.py
+++ b/st2api/st2api/__init__.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-__version__ = '3.6dev'
+__version__ = "3.6dev"
diff --git a/st2auth/st2auth/__init__.py b/st2auth/st2auth/__init__.py
index 2e5ec8277..18f4135fa 100644
--- a/st2auth/st2auth/__init__.py
+++ b/st2auth/st2auth/__init__.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-__version__ = '3.6dev'
+__version__ = "3.6dev"
diff --git a/st2client/st2client/__init__.py b/st2client/st2client/__init__.py
index 2e5ec8277..18f4135fa 100644
--- a/st2client/st2client/__init__.py
+++ b/st2client/st2client/__init__.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-__version__ = '3.6dev'
+__version__ = "3.6dev"
diff --git a/st2common/st2common/__init__.py b/st2common/st2common/__init__.py
index 2e5ec8277..18f4135fa 100644
--- a/st2common/st2common/__init__.py
+++ b/st2common/st2common/__init__.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-__version__ = '3.6dev'
+__version__ = "3.6dev"
diff --git a/st2reactor/st2reactor/__init__.py b/st2reactor/st2reactor/__init__.py
index 2e5ec8277..18f4135fa 100644
--- a/st2reactor/st2reactor/__init__.py
+++ b/st2reactor/st2reactor/__init__.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-__version__ = '3.6dev'
+__version__ = "3.6dev"
diff --git a/st2stream/st2stream/__init__.py b/st2stream/st2stream/__init__.py
index 2e5ec8277..18f4135fa 100644
--- a/st2stream/st2stream/__init__.py
+++ b/st2stream/st2stream/__init__.py
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-__version__ = '3.6dev'
+__version__ = "3.6dev"
diff --git a/st2tests/st2tests/__init__.py b/st2tests/st2tests/__init__.py
index 6e50763e0..da3a41132 100644
--- a/st2tests/st2tests/__init__.py
+++ b/st2tests/st2tests/__init__.py
@@ -30,4 +30,4 @@ __all__ = [
     "WorkflowTestCase",
 ]

-__version__ = '3.6dev'
+__version__ = "3.6dev"

This PR updates our release scripts to use double quotes, and updates the detection regex to allow for either single quotes or double quotes, just in case it is used against an older branch or fork of the st2 codebase.

Apologies for the gnarly branch name.

The corresponding PR to fix the existing code in the st2 codebase is StackStorm/st2#5299.

Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

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

LGTM

@amanda11 amanda11 added this to the 3.6.0 milestone Jul 5, 2021
@winem
Copy link

winem commented Sep 10, 2021

This PR was approved by @amanda11 and @cognifloyd more than two months ago. Is there anything that prevents us from merging it?

@amanda11
Copy link
Contributor

I think this can be merged - just been missed.

@arm4b arm4b merged commit df64064 into master Nov 25, 2021
@arm4b arm4b deleted the Fix-st2_prep_dev-action-to-use-double-quotes branch November 25, 2021 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants