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

Why Taipy is blocking config update in development version #2420

Open
1 of 4 tasks
FlorianJacta opened this issue Jan 22, 2025 · 3 comments
Open
1 of 4 tasks

Why Taipy is blocking config update in development version #2420

FlorianJacta opened this issue Jan 22, 2025 · 3 comments
Labels
Core Related to Taipy Core 💬 Discussion Requires some discussion and decision 📈 Improvement Improvement of a feature. 🟩 Priority: Low Low priority and doesn't need to be rushed

Comments

@FlorianJacta
Copy link
Member

Description

I am in development version. I don't want to keep my .taipy and files generated by user_data.

I change from a Taipy version to another but receive this message:

[2025-01-22 11:11:00.209][Taipy][ERROR] The version 4.1.0.dev0 of Taipy's entities does not match version of the Taipy Version management 4.0.2. Please update the core entities to be compatible with Taipy Core 4.0.2 using the `taipy migrate ...` command. For more information, please run `taipy help migrate`

Why Taipy is blocking config update in development version?

Acceptance Criteria

  • Any new code is covered by a unit tested.
  • Check code coverage is at least 90%.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@FlorianJacta FlorianJacta added Core Related to Taipy Core 📈 Improvement Improvement of a feature. 🟩 Priority: Low Low priority and doesn't need to be rushed labels Jan 22, 2025
@trgiangdo
Copy link
Member

@jrobinAV @FlorianJacta This is happening because of the ConfigCoreVersionMismatched exception is raised here because of the _check_compatibility() method.

Should we skip the _check_compatibility() method when in development mode?

@trgiangdo trgiangdo added the 💬 Discussion Requires some discussion and decision label Jan 23, 2025
@trgiangdo
Copy link
Member

The ConfigCoreVersionMismatched exception is raised before the clean_all_entity_by_version() method, which is trying to load the old _Version entity and the old Config.

Proposal:
Update the _version_manager.py lines 138 - 149 to:

        try:
            if version_number == cls._get_development_version():
                if cls._exists(version_number):
                    return version_number
            else:
                if cls._get(version_number):
                    return version_number
        except InconsistentEnvVariableError:  # The version exist but the Config is alternated
            return version_number
        except ConfigCoreVersionMismatched as e:
            cls._logger.error(e.message)
            raise SystemExit() from e

The main difference is only calling the _get when it's not development mode, otherwise call the _exists method

@trgiangdo
Copy link
Member

To test the problem:

  1. Install taipy 4.0.0
  2. Run an application that create some entities in taipy 4.0.0 in both development mode and experiment mode (so we have entities for both dev and experiment versions)
  3. Install taipy 4.1.0.dev1
  4. Rerun the application in development mode. For the current code, it will log an error.
    • Expected behavior: The application should run
  5. Rerun the application in experiment mode. For the current code, the exception is raised with the whole backlog
    • Expected behavior: The error should be logged properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Related to Taipy Core 💬 Discussion Requires some discussion and decision 📈 Improvement Improvement of a feature. 🟩 Priority: Low Low priority and doesn't need to be rushed
Projects
None yet
Development

No branches or pull requests

2 participants