We hosted a webinar with more than 300 Oracle developers worldwide to discuss how one could implement DevOps.
Database and APEX developers must evolve to embrace CI/CD pipelines for developing, testing, and deploying database code changes.
Easier said than done, right Developers can struggle with the concept of using a central repository for storing, reviewing, and deploying code…especially when you’re coming from a world where , all it took was a ZIP file of scripts and a DBA with SQL*Plus.
These slides & video are the work of our product manager, Brian Spendolini, aka @btspendo. The content covers how using Oracle’s free development tools combined with open source repository tools, one can create a full CI/CD pipeline for database and APEX development groups.
CI/CD Presentation & Demo
The Code! CI/CD Resources on GitHub
The Oracle Database Tools Devops Github Project.
More on SQLcl & Liquibase…
I plan on doing more demonstrations for that in the near future, but here’s what I’ve already covered:
We are really anxious to get started with a new CI/CD approach to our APEX development, especially after reviewing this presentation. The key enablement for us is SQLcl’s native support for APEX with its integrated Liquibase “genobject” command!
However, the functionality seems to be a little buggy when using it with the “split” argument. Using the latest version of SQLcl, we are getting the error “ORA-02291: integrity constraint (APEX_210200.WWV_FLOW_USER_INT_PAGE_FK) violated – parent key not found” when trying to import an APEX app into a new Workspace.
Here are the steps we ran:
1) In source APEX instance we created a brand new app from scratch just for testing SQLcl ability to export/import APEX apps
2) In SQLcl (version: 184.108.40.206 build: 220.127.116.11.1718) connected to source APEX instance database, ran this command:
lb genobject -type apex -applicationid 1270 -skipExportDate -expOriginalIds -split
3) In same SQLcl session, connected to target APEX instance database and rnn this command:
lb update -changelog controller.xml
We logged an SR with Oracle Support and it was confirmed to be a defect and a new bug was filed:
Bug 33130786 : SQLCL LB IMPORTING APEX APPLICATION FAILS WITH ERROR ORA-01400: CANNOT INSERT NULL
The Oracle support analyst seems to think this is a regression since her records indicate the same error was fixed in SQLcl v18.104.22.168.1111 . However, I downloaded that version but still get the error when running step 3 above, so not sure what to do next. Do you have any idea of when this bug will be fixed? In the meantime as a workaround, is there a version of SQLcl we can use that you know for sure works for what we’re doing in steps 2 and 3 above?
33130786 was filed in July 2021…and was fixed and confirmed to be fixed in 22.1
We’re in 22.2 now – and we’ve had a new version of APEX since that version of SQLcl has come out. We do have dependencies with APEX Libraries for making this work when exporting apex apps from SQLcl.
You’re using APEX Version 21 and this bug was filed using APEX 21…have you tired this with SQLcl version 22.1?
If support can reproduce this issues in 22.2, they should re-open the bug as a regression.
Woops.. I pasted in the original bug you are mentioning when I meant to paste in the new bug created for this regression (Oracle Support are able to reproduce the issue):
Bug 34377386 – ORA-02291: INTEGRITY CONSTRAINT WHEN TRYING TO IMPORT APEX APP INTO A NEW WORKSPACE
So far, I’ve tried the same Liquibase commands I used above above in these versions of SQLcl, but none are working successfully:
Support says v22.214.171.124.1111 was where the bug was supposed to have been fixed, so I was thinking along the same lines you’re suggesting and tried it with the closest version to that one I could find to download (v126.96.36.199.1611), as well as the last version in the 22.1 family (v188.8.131.52.0820). Neither worked. Then I tried with the last version in the 21.4 family (v184.108.40.206.1458) and that one didn’t work either.
Is there any version of SQLcl that will work with APEX v21.2.5 for these new CI/CD techniques?
Well, it’s been almost 2 weeks since Bug 34377386 was logged by Oracle Support and there have been no updates on it. Not sure what to expect here… do you think it will be days, weeks, or months until this is resolved?
In the meantime, iss there any version of SQLcl that will work with APEX v21.2.5 for these new CI/CD techniques, in particular the “lb update -changelog controller.xml” command?
We can turn bugs around into fixes for Cloud in as short as 10 days for emergencies.
We have quarterly scheduled updates for sqlcl and patches as necessary. I’ll see what’s up with this bug tomorrow.
2 weeks isn’t a long time though.
Is there *any* version of SQLcl that will work with the “lb update -changelog controller.xml” command?
What version was Brian Spendolini running in the YouTube video above?
Hi Jeff. I was going through the material on CI/CD here at the end of the year. I have some questions I would like to ask. I saw the slide and the bit at the end about reaching you guys on discord. I am unable to find you on discord. Also, I can’t figure out how to send you or Brian an email and I’m not on twitter. How can I join your discord channel?
You can find our discord channel here
thanks for this great Post / those great videos. In an Oracle E-Business Suite context your central assumption “every developer needs his own database” does unfortunately not work this easy: Even with OCI and E-Business Suite Cloud Manager having an “instance per developer” produces a lot of costs.
Is there any experience in “such” an eco system?
an xe instance is free, can be spun up on a docker…pdbs can be built/destroyed as necessary…end of day, this set of steps is highly variable. you could have a shared development instance that everyone is using concurrently, but it’s not ideal