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

CI4: Travis CI build errors #3584

Closed
objecttothis opened this issue Nov 1, 2022 · 33 comments
Closed

CI4: Travis CI build errors #3584

objecttothis opened this issue Nov 1, 2022 · 33 comments
Assignees
Labels
Milestone

Comments

@objecttothis
Copy link
Member

@jekkos any ideas on what's causing these in the #3271 builds?
image
image
image

@jekkos
Copy link
Member

jekkos commented Nov 30, 2022

was looking at the tests yesterday. The setup does not load the CI files as it should. I extend the CIUnittTest class and the init stops after a helper function is called.

@objecttothis
Copy link
Member Author

@jekkos with the CI4 upgrade, now I'm just running the app and fixing problems as it crashes. This is why you're seeing the exception at the helper... that is just the last place I was working. If you or @ALL wants to work on fixing those and it's before 05:00 GMT or after 14:00 GMT Monday - Friday then just go at it. If it's between those hours just get on gitter so that we can coordinate and not double up efforts. There is also the list of Github issues that are not crossed off in the Pull Request.

@jekkos
Copy link
Member

jekkos commented Dec 3, 2022

thanks for the clarification. If I feel like digging into this again I'll check on gitter first.. Btw I have upgraded weblate to the latest version now and it went rather smooth this time.

@objecttothis
Copy link
Member Author

thanks for the clarification. If I feel like digging into this again I'll check on gitter first.. Btw I have upgraded weblate to the latest version now and it went rather smooth this time.

Thanks for doing that. Unless I'm missing something, the current build errors are problems in the code, but I may be mistaken. I'm trying to work through things as I run into them. I'm stuck with validation at the moment because it's not behaving the way that I expect, but I'm sure eventually I'll figure it out.

@jekkos
Copy link
Member

jekkos commented Dec 5, 2022

Thanks for the pointer, it might indeed be an issue with the application's PHP config itself, as it just seems unable to load some helper classes. My guess is that some files are not in the right place. I'll check again perhaps later this week.

@objecttothis objecttothis linked a pull request Dec 10, 2022 that will close this issue
@objecttothis objecttothis removed a link to a pull request Dec 10, 2022
@objecttothis objecttothis linked a pull request Dec 10, 2022 that will close this issue
34 tasks
@jekkos
Copy link
Member

jekkos commented Mar 5, 2023

It seems we have now ran out of credits on travis, there used to be an allocation of free credits for opensource, but this is now also not applicable anymore. I'll reach out to them to see if they can grant the project a bit again, otherwise it might be time to move to github actions.

@jekkos
Copy link
Member

jekkos commented Mar 25, 2023

Build on travis is running again, at least on master.

@jekkos
Copy link
Member

jekkos commented Mar 25, 2023

Screenshot from 2023-03-25 12-44-34

@jekkos
Copy link
Member

jekkos commented May 30, 2023

So as discussed in the bower upgrade, we need a new buildbox for this one. I'll try to create a Dockerfile for node 18 and gulp and see if we can build the project this way

jekkos added a commit that referenced this issue Jun 11, 2023
jekkos added a commit that referenced this issue Jun 11, 2023
jekkos added a commit that referenced this issue Jun 11, 2023
jekkos added a commit that referenced this issue Jun 11, 2023
@jekkos
Copy link
Member

jekkos commented Jun 11, 2023

We have one green build now for ci4 branch. I did do some changes to tag the sql image differently in case we are building a branch, otherwise I might run into issues deploying master simulatenously

@jekkos
Copy link
Member

jekkos commented Jun 11, 2023

I tried to deploy to dev.opensourcepos.org but now get this from the branch

 Fatal error: Uncaught RuntimeException: Your Composer version is too old. Please update Composer (run `composer self-update`) to v2.0.14 or later and remove your vendor/ directory, and run `composer update`. in /app/vendor/codeigniter4/framework/system/Autoloader/Autoloader.php:377 Stack trace: #0 /app/vendor/codeigniter4/framework/system/Autoloader/Autoloader.php(143): CodeIgniter\Autoloader\Autoloader->loadComposerNamespaces(Object(Composer\Autoload\ClassLoader), Array) #1 /app/vendor/codeigniter4/framework/system/Autoloader/Autoloader.php(125): CodeIgniter\Autoloader\Autoloader->loadComposerInfo(Object(Config\Modules)) #2 /app/vendor/codeigniter4/framework/system/bootstrap.php(105): CodeIgniter\Autoloader\Autoloader->initialize(Object(Config\Autoload), Object(Config\Modules)) #3 /app/public/index.php(38): require('/app/vendor/cod...') #4 {main} thrown in /app/vendor/codeigniter4/framework/system/Autoloader/Autoloader.php on line 377

After switching to the official composer image I get these issues

codeigniter4/framework is locked to version v4.3.1 and an update of this package was not requested.
                                                                                                                                                               │    - codeigniter4/framework v4.3.1 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.

jekkos added a commit that referenced this issue Jun 11, 2023
@jekkos
Copy link
Member

jekkos commented Jun 11, 2023

I have updated the composer buildbox now specifically for CI4 and tagged it as a separate version, this should resolve the issue.

@jekkos
Copy link
Member

jekkos commented Jun 13, 2023

I'm able to reach the login page now on dev server, and run the migration. Now I run into this issue

Duplicate column name 'stock_type'

during migration to 3.1.1. Perhaps something wrong in the initial database.sql. Did anyone encounter this one @objecttothis @SteveIreland ?

jekkos added a commit that referenced this issue Jun 20, 2023
jekkos added a commit that referenced this issue Jun 20, 2023
jekkos added a commit that referenced this issue Jun 20, 2023
jekkos added a commit that referenced this issue Jun 20, 2023
jekkos added a commit that referenced this issue Jun 20, 2023
@jekkos jekkos closed this as completed Aug 28, 2023
@jekkos jekkos reopened this Aug 28, 2023
@jekkos
Copy link
Member

jekkos commented Aug 28, 2023

Let's say that the build errors are resolved (green checkmark here). there might be some work to get the config right for development .

@jekkos jekkos closed this as completed Aug 28, 2023
@owlbrudder
Copy link
Collaborator

I would be interested to know if this CI4 branch is redesigning and adding features, or are you doing what I am doing - converting a CI3 instance to run under CI4 with the same features and visual presentation? I just wanted to provide a friend with a version running under PHP8.x and CI4 with no other changes. I am well along the journey, but have plenty more to do.

@jekkos
Copy link
Member

jekkos commented Sep 4, 2023

It's exactly that, upgrade all the code to work with PHP8 and CI4. In case you go your own way then you risk to miss out on future updates, as you will need to keep your version up to date with the official one in some way, so maybe it makes more sense to coordinate the effort on these tasks

@jekkos
Copy link
Member

jekkos commented Sep 4, 2023

There are a couple of extra things that were done also, @SteveIreland has upgraded the grunt build to gulp. And some cleanup is also done along the way.

@owlbrudder
Copy link
Collaborator

You have made exactly the point that has concerned me too. I would rather contribute to the 'real' product than go off on my own without migrations.

I have learnt a great deal on my journey, but i am happy to abandon my hobby now and try to contribute to the proper version.

What is the best way for me to get your current source and start helping? Do you have a full image including the version of CI and Bootstrap etc, or should I just git pull your branch and use it with my existing framework?

@owlbrudder
Copy link
Collaborator

I will add I am between jobs and have happily been putting in 15 hour days on OSPOS, so I hope to be able to hit the ground running.

On the other hand, I have ZERO design documentation for the project and have had to make a lot of educated guesses, some of which have been wrong. Who would have guessed?

@objecttothis
Copy link
Member Author

I will add I am between jobs and have happily been putting in 15 hour days on OSPOS, so I hope to be able to hit the ground running.

On the other hand, I have ZERO design documentation for the project and have had to make a lot of educated guesses, some of which have been wrong. Who would have guessed?

@owlbrudder I've given you some permissions on the repo. Create a branch from the ci4-upgrade branch and then when you have code changes, please create a Pull Request to merge those changes back into ci4-upgrade. This way, as you get to know the code and code style for the project any mistakes will get caught when someone does a code review.

Take a look at the current PR for the CI4 upgrade (#3592) as that has a list that hopefully is being kept up to date.

I recommend getting the current ci4 build running on your local box and then start using it to see what isn't working. Ideally for conversation and chatting, we could use Gitter (https://gitter.im/#apps) so download element from that link and set your homeserver to gitter.im. From there find the opensourcepos project. I'll try to send you an invite to opensourcepos/devroom but it may require you first to get on the platform.

@owlbrudder
Copy link
Collaborator

After working alone on my OSPOS conversion for months, this is going to be a most enjoyable experience.

I will pull the branch as you suggest and try to become familiar with it before I risk any updates.

It is near the end of my working day here (I am temporarily in the Philippines, but looking for work in my homeland of New Zealand and hope to be back there in March) so probably wont get set up until tomorrow my time.

I'll keep you informed of progress. Thank you very much for letting me join the team.

@objecttothis
Copy link
Member Author

After working alone on my OSPOS conversion for months, this is going to be a most enjoyable experience.

I will pull the branch as you suggest and try to become familiar with it before I risk any updates.

It is near the end of my working day here (I am temporarily in the Philippines, but looking for work in my homeland of New Zealand and hope to be back there in March) so probably wont get set up until tomorrow my time.

I'll keep you informed of progress. Thank you very much for letting me join the team.

Super. Hopefully some of the changes you have already made will come in handy for you. Just submit a PR when you have something you want us to look at. I also recommend you comment on the ci4-upgrade PR if there is a particular area you are working on so that we aren't duplicating work. @SteveIreland @jekkos are there particular areas that you are working on currently or areas you think @owlbrudder should try to tackle first? @odiea are you aware of anything in your testing that needs work?

@owlbrudder
Copy link
Collaborator

To clarify, I have login working as well as the home and office menus presenting as per the CI3 version, I have the Employees page working to the stage of presenting data in both the main page and the dialog forms. I also have the site information page presenting properly.

I have not yet started updating data - beginning that was my to-do list for tomorrow, but I have put my project in mothballs now. My method was then going to be to work on one module at a time, getting the display and data entry working before moving to the next module.

I don't have any preference as to where to start and will be glad to work with your guidance. You have to keep in mind I have been a one-man operation with no documentation and no input from anyone, so I don't expect my existing code base to meet your standards, but I have learnt how to convert CI3 to CI4 in many ways and expect the same routine to continue with your input when I get stuck.

@objecttothis
Copy link
Member Author

@

To clarify, I have login working as well as the home and office menus presenting as per the CI3 version, I have the Employees page working to the stage of presenting data in both the main page and the dialog forms. I also have the site information page presenting properly.

I have not yet started updating data - beginning that was my to-do list for tomorrow, but I have put my project in mothballs now. My method was then going to be to work on one module at a time, getting the display and data entry working before moving to the next module.

I don't have any preference as to where to start and will be glad to work with your guidance. You have to keep in mind I have been a one-man operation with no documentation and no input from anyone, so I don't expect my existing code base to meet your standards, but I have learnt how to convert CI3 to CI4 in many ways and expect the same routine to continue with your input when I get stuck.

Probably the low-hanging fruit would be for you to start with testing all the things you have working and anything broken just port over from your code. When making changes, please pay attention to the existing coding practices in the code and try to mimic those. I think we are moving toward PSR-2 compliance (https://en.wikipedia.org/wiki/PHP_Standard_Recommendation) with everything, but trying to take things one step at a time.

Your project should be set to tabs rather than 4 spaces.

@odiea
Copy link
Collaborator

odiea commented Sep 4, 2023

Yes all the modules need work. Most of the Configs don't work. No toast notifications show. Attributes does not work. Receivings is not working. In Sales the discount slider is not working and updating a Sale payment is not working. Posts and Gets need to be set correctly in Controllers. Each Module needs to be gone over. Also can someone find out how to get the check boxes to work?
Most of my testing has been with Php 7.4.13. I have also used Php 8.0.0 and it works also with no changes.

@odiea
Copy link
Collaborator

odiea commented Sep 4, 2023

As far as Reports go. The Names are now showing except for the Inventory Reports due to permissions? Clicking on a Report now brings up the Inputs but after that it loops back to the Report Module due to the following code it is looking for index..

public function index(): void
	{
		$this->getIndex();
	}

	//Initial Report listing screen
	public function getIndex(): void
	{
		$this->clearCache();

		$data['grants'] = $this->employee->get_employee_grants($this->session->get('person_id'));

		echo view('reports/listing', $data);
	}

@objecttothis
Copy link
Member Author

@owlbrudder to make code reviews go as smoothly as possible, please limit each pull request to one set of fixes. For example, if you submit a pull request against the ci4-upgrade branch that just has fixes getting reports working, that's way better than a PR that has smatterings of various fixes.

@owlbrudder
Copy link
Collaborator

I have set up my connection to the gitter.im opensourcepos/Lobby, so could continue this thread there if you prefer.

I have downloaded the CI4 upgrade branch .zip and note the INSTALL.md still says is will run on PHP 7.x

I will try to install it in parallel with my existing OSPOS-3.3.8 on my main development machine, which I have specifically loaded with PHP 7.4

As long as the CI4 upgrade branch does not contain any PHP 8.x specific code, I will run the two versions on the development machine so I can easily compare results. I guess I will discover whether the CI4 version contains PHP8.x specific code .. :D

What tools do we use for bug and issue tracking?

@owlbrudder
Copy link
Collaborator

@owlbrudder to make code reviews go as smoothly as possible, please limit each pull request to one set of fixes. For example, if you submit a pull request against the ci4-upgrade branch that just has fixes getting reports working, that's way better than a PR that has smatterings of various fixes.

Absolutely! I will focus on one issue per submission, which is why I raised the question regarding bug and issue tracking tools. I guess I expected to have each issue assigned a ticket and each ticket assigned one or more people, so the rewrite stays reasonably under control. I have no problem if we don't use such a tool, because I have been working on the upgrade alone for a long time and just kept a list of reminder notes on my to do list.

@jekkos
Copy link
Member

jekkos commented Sep 5, 2023

You can create issues here on github, and then perhaps link them in the CI4 pull request so we can keep track of them. If you label the issues for release 3.4 then we can keep track of them easily.

@owlbrudder
Copy link
Collaborator

After an epic battle with SELinux, file ownership and some typos I am too embarrassed to admit, I now have my CI3 3.3.8 and my CI4 half complete 3.3.8 conversion both running on my development machine.

Alongside this I have the latest branch of 3.4.0 which is dying at the point index.php tries to run $app = Config\Services::codeigniter(); with no error messages and an entirely unhelpful 500 return code from Apache. Sadly, I have not yet seen the 3.4.0 login page.

Now that I have my two versions of 3.3.8 running, I should be able to track down this problem fairly easily .. tomorrow. It is now 7:45pm and I have been working solidly since 5:30am, so I am happy to quit for the day.

If anyone knows why I have this problem with the call to codeigniter(), you might save me some time in the morning. :D

@objecttothis
Copy link
Member Author

After an epic battle with SELinux, file ownership and some typos I am too embarrassed to admit, I now have my CI3 3.3.8 and my CI4 half complete 3.3.8 conversion both running on my development machine.

Excellent!

Alongside this I have the latest branch of 3.4.0 which is dying at the point index.php tries to run $app = Config\Services::codeigniter(); with no error messages and an entirely unhelpful 500 return code from Apache. Sadly, I have not yet seen the 3.4.0 login page.

Did you do anything with your .env file? That may have values that need to be entered. Server 500 errors usually are configuration issues. Check your php and apache error logs.

Now that I have my two versions of 3.3.8 running, I should be able to track down this problem fairly easily .. tomorrow. It is now 7:45pm and I have been working solidly since 5:30am, so I am happy to quit for the day.

Good work!

If anyone knows why I have this problem with the call to codeigniter(), you might save me some time in the morning. :D

This conversation is way off topic. Let's move it either to discussions or to gitter (element). I sent you an invitation to the devroom. Did you receive it?

@opensourcepos opensourcepos locked as off-topic and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants