Skip to content

Commit

Permalink
Replaces the default astronomer image with 2.0.0-buster-onbuild (#401)
Browse files Browse the repository at this point in the history
* Replaces the default astronomer image with 2.0.0-buster-onbuild

The image with the tag "latest_onbuild" references image b17129847bec, which is an alpine image for Airflow 1.10.7. This image is broken. An error is received when the user attempts to rebuild (aka deploy their dags to Astronomer Platform). There is an issue to implement a proper fix (astronomer/issues#2275), but until that can be done, this PR changes the default to a 2.0 on-build debian image. This ensures that users who are using Astro cli for the first time to create a new deployment project will start with a non-broken image, and hopefully have a smoother experience.

* tweak config

Co-authored-by: Andrii Soldatenko <[email protected]>
  • Loading branch information
2 people authored and Adam Vandover committed Mar 16, 2021
1 parent 7b45831 commit 4efb05b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
- image: quay.io/astronomer/ap-houston-api:latest
- image: quay.io/astronomer/ap-houston-api:0.23.15
name: houston
entrypoint: "yarn start"
environment:
Expand Down
2 changes: 1 addition & 1 deletion cmd/airflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func airflowInit(cmd *cobra.Command, args []string, client *houston.Client, out
// }

if len(defaultImageTag) == 0 {
defaultImageTag = "latest-onbuild"
defaultImageTag = "2.0.0-buster-onbuild"
fmt.Printf("Initializing Airflow project\nNot connected to Astronomer, pulling Airflow development files from %s\n", defaultImageTag)
}

Expand Down
18 changes: 9 additions & 9 deletions docker/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ func TestAllCmds(t *testing.T) {
}

func TestParseReaderParseError(t *testing.T) {
dockerfile := "FROM quay.io/astronomer/ap-airflow:latest-onbuild\nCMD [\"echo\", 1]"
dockerfile := "FROM quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild\nCMD [\"echo\", 1]"
_, err := ParseReader(bytes.NewBufferString(dockerfile))
assert.IsType(t, ParseError{}, err)
}

func TestParseReader(t *testing.T) {
dockerfile := `FROM quay.io/astronomer/ap-airflow:latest-onbuild`
dockerfile := `FROM quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild`
cmds, err := ParseReader(bytes.NewBufferString(dockerfile))
assert.Nil(t, err)
expected := []Command{
{
Cmd: "from",
Original: "FROM quay.io/astronomer/ap-airflow:latest-onbuild",
Original: "FROM quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild",
StartLine: 1,
EndLine: 1,
Flags: []string{},
Value: []string{"quay.io/astronomer/ap-airflow:latest-onbuild"},
Value: []string{"quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild"},
},
}
assert.Equal(t, expected, cmds)
Expand All @@ -47,11 +47,11 @@ func TestParseFile(t *testing.T) {
expected := []Command{
{
Cmd: "from",
Original: "FROM quay.io/astronomer/ap-airflow:latest-onbuild",
Original: "FROM quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild",
StartLine: 1,
EndLine: 1,
Flags: []string{},
Value: []string{"quay.io/astronomer/ap-airflow:latest-onbuild"},
Value: []string{"quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild"},
},
}
assert.Equal(t, expected, cmds)
Expand All @@ -61,14 +61,14 @@ func TestGetImageTagFromParsedFile(t *testing.T) {
cmds := []Command{
{
Cmd: "from",
Original: "FROM quay.io/astronomer/ap-airflow:latest-onbuild",
Original: "FROM quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild",
StartLine: 1,
EndLine: 1,
Flags: []string{},
Value: []string{"quay.io/astronomer/ap-airflow:latest-onbuild"},
Value: []string{"quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild"},
},
}
image, tag := GetImageTagFromParsedFile(cmds)
assert.Equal(t, "quay.io/astronomer/ap-airflow", image)
assert.Equal(t, "latest-onbuild", tag)
assert.Equal(t, "2.0.0-buster-onbuild", tag)
}
2 changes: 1 addition & 1 deletion docker/testfiles/Dockerfile.ok
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM quay.io/astronomer/ap-airflow:latest-onbuild
FROM quay.io/astronomer/ap-airflow:2.0.0-buster-onbuild

0 comments on commit 4efb05b

Please sign in to comment.